Skip to content

Two acceptance tests the spec names and nothing wrote: T483 and T486 - #189

Merged
rohanrkamath merged 1 commit into
mainfrom
tests/t483-t486
Sep 13, 2026
Merged

rohanrkamath merged 1 commit into
mainfrom
tests/t483-t486

Conversation

@arpanghoshal

Copy link
Copy Markdown
Member

These were pushed to release/0.10.0 a few minutes after #188 merged, so they missed it. Same
commit, on its own branch. Pairs with ctrlrun-docs readiness/6068, which moves the test count
this adds.

The audit that found them

Of T470 to T507, eight numbers had no test at all. Run, not remembered:

  • Four are covered under another name and are a naming debt, not a coverage gap: T481 inside
    T474's not_mine case, T482 in test_hop_surfaces, T484 by the upgrade suite, T500 by
    T499a. T488 and T499 exist only as T488a/b/c and T499a.
  • Two were genuinely uncovered, and are here.
  • Two remain, named rather than left: T480 and T502. 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.5 refuses when it lets a scope
hash reach a receipt while the scope never does.

== rather than not in, because assert "actions" not in data names one leak and passes over
every other. And both rows are read off §3.3's table, not off _authority_data — §11 records an
earlier version of this test asserting a key set that matched neither the prose nor the code.

Mutated: one permitted_actions key added to a hop refusal's payload. T483 fails. Restored, 28
pass.

T486 — a resume inside an unrelated ambient task= and hop= reads neither

v0.9 §6.3.2's ambient-context hazard, at the hop. A relay serving several agents resumes a
suspended leg from inside its own Control.hop(...) block; a resume that read the ambient value
decides 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 the
answer 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 with params.metadata.agent_id naming a different agent is decided
    on the IdentityProvider's principal. True by construction today: gateway/mcp.py reads only
    hop and task out of that bag and never agent_id. What is missing is the regression guard
    against a future read, not the property.
  • T502 — the four v0.9 regressions as regression tests. §13.8 singles out its last row as the
    one nothing else in this repository would catch.

Full gate: 3,999 passed, 304 skipped. The one local failure is a half-installed langgraph in
the dev environment, not reproducible in CI's adapters job.

Not merging.

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>
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c6a2f3ad-e8a8-4cd5-9e07-534f8198e7c0

📥 Commits

Reviewing files that changed from the base of the PR and between f3f9096 and 561b2cb.

📒 Files selected for processing (1)
  • tests/test_hop.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rohanrkamath
rohanrkamath merged commit 210c3e1 into main Sep 13, 2026
16 checks passed
@rohanrkamath
rohanrkamath deleted the tests/t483-t486 branch September 13, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants