feat(ci): smoke gate probes memory recall round-trip + fix recall --json stdout pollution#1219
Merged
Merged
Conversation
…out pollution Extends the required default-install-smoke gate beyond CLI boot to the personal-memory capture -> recall round-trip, and fixes the product bug the probe surfaced. Why: 9.3.0 shipped with `attune memory recall` broken (capture ok, recall printed "No results found." and exited 0) while every unit test was green - the tests mocked the RAG layer that was broken. The gate that existed then only booted the CLI, so the class sailed through. The probe reproduces the clean-venv + fake-HOME audit that caught the bug, against the shipped wheel, asserting on recall CONTENT (never the exit code, which is 0 even for zero hits). Product fix found by dogfooding the probe: the RAG layer logs to stdout (structlog default PrintLogger), so `attune memory recall --json` emitted a rag.run log line ahead of the JSON - unparseable for machine consumers (`... --json | jq` failed). cmd_memory_recall now captures query-time stdout noise and forwards it to stderr, keeping stdout pure result output in both modes. Regression test added (test_json_output_survives_stdout_log_noise). Receipt: full script run against a locally built 9.4.0 wheel - bare install, CLI boots, capture -> recall returns the captured content, log noise on stderr, stdout parses as pure JSON. 30/30 memory-command tests green; workflow-yaml guard suite green (261 passed). Job id/name unchanged (default-install-smoke is a required check). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Institutionalizes the probe that caught the 9.3.0 broken-recall bug —
the required
default-install-smokegate now exercises thepersonal-memory capture -> recall round-trip against the shipped
wheel, not just CLI boot. (Follow-through from the Discipline
article's C9: "dogfood the artifact you actually ship." #1218's §7
receipt is this bug's story; this PR makes the catch structural.)
What
scripts/smoke_default_install.sh— new probe: fake-HOME(isolated global memory root), keyless (
ANTHROPIC_API_KEY="",empty not unset),
attune memory capture->recall --json,asserting on returned CONTENT. Recall exits 0 even with zero hits
("No results found."), which is exactly why a boot-only gate missed
9.3.0 — the assertion is on the JSON, never the exit code.
src/attune/cli_commands/memory_commands.py— product bug theprobe surfaced by dogfooding: the RAG layer logs to stdout
(structlog default PrintLogger), so
recall --jsonemitted arag.runlog line ahead of the JSON —... --json | jqwasunparseable. Query-time stdout noise is now forwarded to stderr;
stdout stays pure result output.
tests/unit/test_cli_memory_commands.py— regression guard:--jsonstdout must parse as JSON even when the query layer printslog noise; the noise must land on stderr, not be swallowed.
.github/workflows/tests.yml— job doc comment updated. Jobid/name UNCHANGED (
default-install-smokeis a required check).Receipts
CLI boots, capture -> recall returns the captured content, log
noise on stderr, stdout parses as pure JSON,
PASS.tests/unit/test_cli_memory_commands.py: 30/30 green.tests/unit/ci/test_workflow_yaml.py: 261 passed, 1 skipped.🤖 Generated with Claude Code