[AAASM-5750] 📝 (core): Point the §6 Planned referent at the capability ticket - #316
Merged
Merged
Conversation
ADR 0033 §6 scopes `Planned` to "decided but not implemented — a ticket reference". All three sites referenced AAASM-5731, which measured the absence of an SDK-side audit sink but never intended to build one. That ticket is now closed, so the term reads as a live commitment while the reference points at finished work. AAASM-5750 owns the capability. The term itself is unchanged; references citing AAASM-5731 as the ticket that *measured* the drop are left alone, because those are still true.
The referent lives in a docstring or a comment, and those are the artifacts in a source tree with no mechanical check on them. These three were corrected by hand once and would stay correct only until the next edit. The scan pairs each §6 `Planned` with a ticket reference on the same line and asserts the referent. Lowercase `planned` is ordinary English and is not the term; a `Planned` with no ticket on the line is prose continuation, not a referent — `docs/examples/framework-support.md`'s maturity label is a different axis and is deliberately out of scope. A separate floor test guards the scan itself: an empty walk and a clean tree otherwise report the same result.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Independent review broke the first version three ways, and all three came from one design mistake: the gate scanned its own file. Its header names AAASM-5750, so the floor was partly satisfied by the gate quoting itself — in node it was satisfied ENTIRELY that way, and deleting the only real site left the suite green. Four changes: * **Exclude the gate file from its own scan.** Verified with a positive control: the same stale-referent line fails when placed in any other file. * **Assert the expected SET of guarded paths, not a count.** A count can be held up by an unrelated site appearing as a real one is deleted; naming the paths makes that substitution visible. * **Pair the claim with a ticket on its line OR the next.** Coverage was decided by where a comment happened to wrap — python's quickstart control split `Planned` from its ticket across two lines and was silently unchecked while the PR claimed it was covered. Reflowing a comment now cannot hide a stale referent. * **Stop asserting that every `Planned` names AAASM-5750.** §6 scopes the term to any decided-but-unbuilt capability with any ticket, so the first version would have failed CI on the next unrelated roadmap row. The invariant is now the narrow one that is actually true: AAASM-5731 and AAASM-5681 measured the absence and will not fix it, so neither may ever be a forward referent. The rule is also now attributed correctly. It comes from AAASM-5750's own description, not from ADR 0033 §6 — §6 requires *a* ticket reference and says nothing about which. A failure message citing an ADR for a rule the ADR does not contain sends the next reader to the wrong document.
…he stale ones
Round-2 review: narrowing the invariant to a two-element denylist stopped the
gate asserting the thing the change actually made true. Repointing a guarded
site to ANY non-stale ticket passed green — including a real sibling ticket:
ffi_governance_client.go:169 AAASM-5750 -> AAASM-5749 -> ok
The likeliest drift — AAASM-5750 gets split or superseded and someone updates
the referent — was undetected. Round 1 was too broad, round 2 too narrow.
Two tiers, so neither failure mode returns:
* a **guarded** site (one of the named audit-sink deferrals) must name
AAASM-5750 exactly;
* **any other** site must merely not name a stale referent, so an unrelated
roadmap row is still legitimate.
The positive assertion is scoped to a named set, so it carries none of round
1's repo-wide over-breadth.
Also fixed: the one-line lookahead had no directionality, and created a new
false-positive class the same-line rule could not. A line of forward-looking
prose inserted above a correct BACKWARD citation was blamed for it:
153: // Streaming record delivery is Planned for a later release.
154: // RecordResult discards the record and reports success (AAASM-5731).
FAIL: ...:153 defers to AAASM-5731
The window now extends only when the claim line carries no ticket of its own
AND does not end a sentence. There are 81 backward citations across the three
SDKs — go 30, python 33, node 18 — each a landmine for any adjacent claim
prose. Zero are adjacent today, so this was green by luck of layout.
Two residual limits are disclosed in the header rather than papered over: the
reachability check is per file rather than per site, and the excluded gate file
is a hiding place. Both measured as currently unreachable.
|
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.



Description
Repoints the three ADR 0033 §6
Plannedreferent sites from AAASM-5731 to AAASM-5750, and adds a source scan that keeps them pointed correctly.§6 scopes
Plannedto "decided but not implemented — a ticket reference; no capability claim." AAASM-5731 measured the absence of an SDK-side audit sink; it never intended to build one, and it is now closed. So today the term reads as a live commitment while the reference points at finished work. AAASM-5750 owns the capability.This is that ticket's own "Until then" step — the capability itself (actually wiring a sink) stays open.
Sites repointed (3)
agent_assembly/core/audit_sink.py:22makes SDK-side recording **Planned** (…), notagent_assembly/adapters/_shared/tool_governance.py:188Under ADR 0033 §6 that makes SDK-side recording **Planned** (…)test/unit/test_quickstart_negative_control.py:303(…), not Unmeasured, since where the record stops has beenDeliberately NOT repointed
Stated so the boundary is reviewable rather than implicit. Each of these cites AAASM-5731 as the ticket that measured the drop, which is still true:
client/gateway.py:23,adapters/haystack/patch.py:17,adapters/llamaindex/adapter.py:15,core/assembly.py:127,325,439,544,559,core/runtime_interceptor.py:237,242,390— finding referencesdocs/**andREADME.md— 14 prose references to the measurementAUDIT-PROBE-AAASM-5731constant andtest_audit_sink_disposition.py's headerdocs/examples/framework-support.md:57's⏳ Planned— a docs-area maturity label, a different axis with a different owner. Not touched.The gate
Nothing tests a comment or a docstring — they are the artifacts in a source tree with no mechanical check on them, and these three were corrected by hand once already.
test/unit/core/test_planned_referent.pywalks from thepyproject.tomlroot, pairs each §6Plannedwith a ticket reference on the same line, and asserts the referent.Two controls, both run:
core/audit_sink.py:22to AAASM-5731scan found 0 …, floor is 3 … passing over nothingThe second matters as much as the first: an empty scan and a clean scan otherwise report the same result. Lowercase
plannedis ordinary English and is excluded by the pattern —docs/development/adr/0001-hook-architecture.md:22("was planned but superseded … AAASM-162") sits on a line with a ticket reference and is correctly not a site.Type of Change
Breaking Changes
Related Issues
Testing
test/unit/core/test_planned_referent.py, with both controls exercisedMeasured:
pytest test/ruff check .ruff format --checkon changed filespre-commiton the staged filesPre-existing red on
main, not from this branch:ruff format --check .reportsscripts/check_contact_metadata.pywould be reformatted.git diff --name-only remote/main -- scripts/check_contact_metadata.pyreturns nothing, so this branch does not touch it — it is AAASM-5748 (python-sdk pre-commit red on main, enforced by no CI job). Left alone deliberately rather than swept into this PR.mypy agent_assemblyreports 4 pre-existingimport-not-founderrors foragent_assembly._core— the native shim is not built in this worktree. Also not from this branch;pre-commit's mypy hook passes over the staged files.Checklist
Review round 2 — the gate was broken, and it was broken the way it was built to prevent
Independent review found three ways the first gate could not fail. All three had one cause: the gate scanned its own file, whose header names AAASM-5750. That padded the site count with the gate quoting itself.
test_quickstart_negative_control.pysplitsPlannedand its ticket across two lines. The same-line-only scan never saw it — the PR claimed coverage it did not have.Plannedin the repo names AAASM-5750. §6 scopes the term to any decided-but-unbuilt capability with any ticket, so the next unrelated roadmap row would have broken CI for a reason no reader could guess.What the gate asserts now
Two assertions, each narrow enough to be true:
Plannedortracked as, paired with a ticket on its own line or the next, must not name AAASM-5731 or AAASM-5681. Those measured the absence; neither will build the sink. This never false-positives on an unrelatedPlanned.The gate file is excluded from its own scan, with a positive control proving the exclusion is scoped: the identical stale-referent line fails when placed in any other file.
Every probe that previously passed, re-run against the rebuilt gate
tracked aslinePlanned (AAASM-9999)The reviewer also disputed the AAASM-5755 rationale, and the dispute holds up: capability-manifest row G10 (
governance/capability-manifest.yaml:5123-5168) files a measured audit drop ascoverage: unmeasured, andgovernance/README.md:417-419is normative — "If none fits, the answer isunmeasured, not a twelfth term." That is precedent pointing the other way. AAASM-5755 has been re-scoped from a directive into an adjudication: it now asks which term is right, and lists the outcome where go-sdk and python-sdk are the ones that get corrected. No claim in this PR depends on the answer.Review round 3 — round 2 was too narrow, in the opposite direction
Round 2 replaced an over-broad assertion with a two-element denylist. Review found that this stopped the gate asserting the thing the change made true: repointing a guarded site to any non-stale ticket passed green, including a real sibling ticket.
The likeliest drift — AAASM-5750 gets split or superseded and someone updates the referent — was undetected. Round 1 was too broad; round 2 too narrow. Both directions are now covered by splitting the assertion:
AAASM-5750exactlyThe positive assertion is scoped to a named set, so it carries none of round 1's repo-wide over-breadth — the roadmap-row probe still passes.
A second defect round 2 introduced
The one-line lookahead had no directionality, and created a false-positive class the same-line rule could not produce. Forward-looking prose inserted above a correct backward citation was blamed for it:
There are 81 backward citations across the three SDKs — go 30, python 33, node 18 — each a landmine for adjacent claim prose. None is adjacent today, so this was green by luck of layout rather than by construction.
The window now extends only when the claim line carries no ticket of its own and does not end a sentence. The reviewer's suggested fix (extend only within the same comment block) would not have worked — in the example above both lines are in one block. The sentence terminator is the discriminator that actually separates the two cases: the inserted line ends in
., python's genuinely wrapped site ends in§6.Disclosed rather than fixed
tool_wrapper.go:115("which is what Planned names") is legitimate prose with no ticket and would fail. Needs two coordinated edits; no file carries more than one site today.Both are written into each gate's header.
Gates re-run
0 issues