Two acceptance tests the spec names and nothing wrote: T483 and T486 - #189
Merged
Merged
Conversation
An audit of §8's tables against the tree: of `T470` to `T507`, eight numbers had no test. Four of
those eight are covered under a different name (`T481` inside `T474`'s `not_mine` case, `T482` in
`test_hop_surfaces`, `T484` by the upgrade suite, `T500` by `T499a`) and are a naming debt. Two were
genuinely uncovered properties, and both are here. `T480` and `T502` remain, and the PR body says so.
**T483 — a hop refusal's event carries §3.3's exact key set.** As a set, both rows. The point is the
negative half: a refusal may carry the id the caller already holds and the *name* of the row that
stopped it, never the patterns, the limits, the subject or the expiry, because each refusal would
otherwise be one question against the envelope and a peer enumerates it a key at a time. `==` rather
than `not in`, so a field added later goes red here instead of shipping. §11 records an earlier
version of this test asserting a key set that matched neither the prose nor the code, so both rows
are read off §3.3's table rather than off `_authority_data`.
Mutated: one `permitted_actions` key added to a hop refusal's payload, T483 fails.
**T486 — a resume inside an unrelated ambient `task=` and `hop=` reads neither.** `v0.9 §6.3.2`'s
hazard at the hop. A relay serving several agents resumes a suspended leg from inside its own
`Control.hop(...)`, and a resume that read the ambient value decides agent A's action against agent
B's envelope — fail-open whenever the ambient hop is wider.
The first version of this test was not enough, and a mutation run is what said so. With the event
carrying both values as strings, a reader that falls back to the ambient value **only when the
event's is absent** passes. The added case is a 0.10 leg that recorded `{"task": null, "hop":
null}`: the keys are present, so it is not 0.9.0's silence, and the answer must still be neither.
Both mutations now fail: ambient-as-fallback, and ambient-takes-precedence.
Full gate: 3,999 passed, 304 skipped.
Signed-off-by: arpan <contact@arpanghoshal.com>
|
Warning Review limit reachedNext included review available in 5 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
These were pushed to
release/0.10.0a few minutes after #188 merged, so they missed it. Samecommit, on its own branch. Pairs with ctrlrun-docs
readiness/6068, which moves the test countthis adds.
The audit that found them
Of
T470toT507, eight numbers had no test at all. Run, not remembered:T481insideT474'snot_minecase,T482intest_hop_surfaces,T484by the upgrade suite,T500byT499a.T488andT499exist only asT488a/b/candT499a.T480andT502. See the end.T483 — a hop refusal's event carries §3.3's exact key set
As a set, and on both rows of the table. The negative half is the point: a refusal may carry
the id the caller already holds and the name of the row that stopped it, never the patterns,
the limits, the subject or the expiry. Otherwise each refusal is one question against the envelope
and a peer enumerates it a key at a time, which is what
v0.9 §5.5refuses when it lets a scopehash reach a receipt while the scope never does.
==rather thannot in, becauseassert "actions" not in datanames one leak and passes overevery other. And both rows are read off §3.3's table, not off
_authority_data— §11 records anearlier version of this test asserting a key set that matched neither the prose nor the code.
Mutated: one
permitted_actionskey added to a hop refusal's payload. T483 fails. Restored, 28pass.
T486 — a resume inside an unrelated ambient
task=andhop=reads neitherv0.9 §6.3.2's ambient-context hazard, at the hop. A relay serving several agents resumes asuspended leg from inside its own
Control.hop(...)block; a resume that read the ambient valuedecides agent A's suspended action against agent B's envelope. Fail-open whenever the ambient hop
is wider than the recorded one.
The first version of this test was not enough, and a mutation run is what said so. With the
event carrying both values as strings, a reader that falls back to the ambient value only when the
event's is absent takes the event's value anyway and passes. The added case is a 0.10 leg that
recorded
{"task": null, "hop": null}: the keys are present, so it is not 0.9.0's silence, and theanswer must still be neither.
Mutated, twice. Ambient-as-fallback: fails. Ambient-takes-precedence: fails. Restored: 28 pass.
Only the second mutation failed against the first version of the test, which is why it was
rewritten.
What is still owed
T480— a hop presented withparams.metadata.agent_idnaming a different agent is decidedon the
IdentityProvider's principal. True by construction today:gateway/mcp.pyreads onlyhopandtaskout of that bag and neveragent_id. What is missing is the regression guardagainst a future read, not the property.
T502— the four v0.9 regressions as regression tests. §13.8 singles out its last row as theone nothing else in this repository would catch.
Full gate: 3,999 passed, 304 skipped. The one local failure is a half-installed
langgraphinthe dev environment, not reproducible in CI's adapters job.
Not merging.