Skip to content

feat(ci): smoke gate probes memory recall round-trip + fix recall --json stdout pollution#1219

Merged
silversurfer562 merged 1 commit into
mainfrom
feat/smoke-memory-roundtrip
Jul 2, 2026
Merged

feat(ci): smoke gate probes memory recall round-trip + fix recall --json stdout pollution#1219
silversurfer562 merged 1 commit into
mainfrom
feat/smoke-memory-roundtrip

Conversation

@silversurfer562

Copy link
Copy Markdown
Member

Institutionalizes the probe that caught the 9.3.0 broken-recall bug —
the required default-install-smoke gate now exercises the
personal-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 the
    probe surfaced by dogfooding: the RAG layer logs to stdout
    (structlog default PrintLogger), so recall --json emitted a
    rag.run log line ahead of the JSON — ... --json | jq was
    unparseable. Query-time stdout noise is now forwarded to stderr;
    stdout stays pure result output.
  • tests/unit/test_cli_memory_commands.py — regression guard:
    --json stdout must parse as JSON even when the query layer prints
    log noise; the noise must land on stderr, not be swallowed.
  • .github/workflows/tests.yml — job doc comment updated. Job
    id/name UNCHANGED (default-install-smoke is a required check).

Receipts

  • 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, 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

…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>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
attune-ai.dev Ready Ready Preview, Comment Jul 2, 2026 4:50pm
website Ready Ready Preview, Comment Jul 2, 2026 4:50pm

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@silversurfer562 silversurfer562 merged commit 51a15b3 into main Jul 2, 2026
51 of 52 checks passed
@silversurfer562 silversurfer562 deleted the feat/smoke-memory-roundtrip branch July 2, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant