[AAASM-4719] ♻️ (examples): Own every SDK-version surface + orphan-literal audit#312
Merged
Merged
Conversation
The generator owned only the table form of the Prerequisites SDK requirement; go/README.md states it as a Markdown bullet, which drifted to rc.3 while the table rows advanced to rc.5. Add a list-marker-anchored bullet matcher and wire it into process_prereq_rows so the version can no longer disagree across forms. Closes AAASM-4717 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HMnPRm9T3fdrS4uNYXkzg6
The live-core-enforcement python-agent Dockerfile pins the SDK via pip install agent-assembly==<ver>, previously hand-maintained (AAASM-4702 had to hand-bump it). Add a bounded, non-recursive Dockerfile walker and a lookbehind-anchored rewriter so the pin tracks the SoT and is covered by the audit. No content diff today (already rc5); this is ownership only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HMnPRm9T3fdrS4uNYXkzg6
Make the generator the complete source of truth by adding the matching reader: --check scans the bounded human-authored surfaces (manifest pins under python/ node/ go/ scenarios/ and SDK-version prose in READMEs + docs/*.md, never lockfiles or vendored trees) and exits non-zero naming each drifted file:line. A newly added stale surface now fails CI. Lines carrying the inline 'sdk-version-exempt' marker are skipped for legitimate historical/provenance text. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HMnPRm9T3fdrS4uNYXkzg6
Trigger the metadata drift lane on scenario go.mod and Dockerfile changes (newly owned) and on the generator test file, then run the --check audit and the generator unit tests. permissions stay contents: read; other lanes untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HMnPRm9T3fdrS4uNYXkzg6
Cover, against synthetic tmp trees: bullet rewrite (incl. trailing-note preservation, no-collision with the table row and generated block), Dockerfile pin rewrite and its identifier precision + two-level walk bound, and the audit (in-sync pass, stale manifest/Dockerfile/prose detection, exemption marker, and subpackage/org-path non-false-match). Adds scripts/__init__.py so the suite is importable via unittest. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HMnPRm9T3fdrS4uNYXkzg6
|
Contributor
Author
|
Review (AAASM-4719, closes AAASM-4717) — READY.
Base master; awaiting Pioneer review — not merged. — Reviewed by Claude Code |
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.



What changed
Makes
scripts/generate_example_metadata.pythe complete single source of truth for SDK-version literals and adds a coverage invariant so a new stale surface fails CI. Four capabilities, stdlib-only and idempotent:## PrerequisitesSDK row;go/README.mdstates it as a Markdown bullet, which had drifted tov0.0.1-rc.3while the table rows advanced torc.5. A list-marker-anchored bullet matcher (wired intoprocess_prereq_rowsalongside the table matcher) now aligns it —go/README.md:33is rewritten tov0.0.1-rc.5. It cannot collide with the table row (leading|) or the generatedsdk-installblock, and a trailing note is preserved.agent-assembly==<ver>pip pin inscenarios/*/Dockerfile/scenarios/*/*/Dockerfile(the live-core-enforcement python-agent image) is now owned via a bounded, non-recursive walker and a lookbehind-anchored rewriter. No content diff today (already rc5) — this closes the ownership gap that forced a hand-bump in AAASM-4702.--checkorphan-version-literal audit. A new--checkmode (default stays: rewrite) scans a bounded set of human-authored surfaces — manifest pins (pyproject.toml/package.json/go.mod/Dockerfileunderpython/ node/ go/ scenarios/) and SDK-version prose in READMEs +docs/*.md— and exits non-zero naming eachfile:linethat drifts from the SoT. It never scans lockfiles or vendored trees, matches the main-SDK identifiers precisely (no false-match on@agent-assembly/runtime-*or thegithub.com/ai-agent-assembly/...org path), and honors an inlinesdk-version-exemptmarker for legitimate historical/provenance text..github/workflows/example-metadata-check.ymlgainsscenarios/**/go.modandscenarios/**/Dockerfiletrigger paths, plus steps that run--checkand the new unit tests.permissions: contents: readunchanged; other lanes untouched.Related ticket
Closes AAASM-4719
Closes AAASM-4717
How to verify
Run from the repo root (all stdlib, no installs):
Negative check: edit any pin to a wrong version and
--checkexits non-zero naming itsfile:line; revert restores exit 0.New tests (
scripts/test_generate_example_metadata.py, 13 cases) cover the bullet rewrite (trailing-note preservation + no-collision with the table/generated block), the Dockerfile rewrite (identifier precision + two-level walk bound), and the audit (in-sync pass, stale manifest/Dockerfile/prose detection, exemption marker, subpackage/org-path non-false-match).Checklist
[AAASM-XXXX] <GitEmoji> (<scope>): <summary>.envfiles committedREADME.mdwith prerequisites and run instructions🤖 Generated with Claude Code
https://claude.ai/code/session_01HMnPRm9T3fdrS4uNYXkzg6