Re-anchor the composio scopes refusal on the message it now emits - #5818
Conversation
`Rust Core Coverage` is red on main:
composio_raw_coverage_e2e::composio_controller_registry_and_scope_handlers_cover_validation_edges
assertion failed: memory_missing.contains("memory client not initialised")
The string does not exist anywhere in `src/`. `1bf2037a0` ("Stop booting the
second in-process memory engine", tinyhumansai#5725, merged 15:39) removed the
in-process engine handle that produced it and moved the storage half onto
the bound driver. The assertion was never re-anchored, so it has been
asserting a message the product no longer emits ever since — an orphaned
test in the sense of tinyhumansai#5757 / tinyhumansai#5776.
It survived its own PR because the coverage lane is changed-modules-scoped
and that PR did not touch a module which routes to `tests/raw_coverage`.
`ops::user_scopes::save` refuses on three deliberately distinguishable
grounds: "memory driver unavailable" (nothing bound), "does not serve Graph"
(bound, wrong family), and "kv_put failed" (bound, right family, the write
itself failed). Measured rather than assumed — the first re-anchor here
guessed the Graph arm and was wrong. What this path actually reaches is:
[composio][scopes] kv_put failed: the module host policy was never
published, so module 'tinymemory' cannot be loaded; ...
The module provider binds and does serve Graph; the cdylib is simply never
loaded in a test binary that runs no boot sequence.
Pinned: the `[composio][scopes]` tag and the `kv_put failed` arm, which is
what makes this a fail-closed assertion — the handler must refuse rather
than report a save it did not perform, and it must refuse on the write
rather than on one of the other two grounds. Deliberately NOT pinned: the
reason after the colon, which belongs to the module loader rather than to
this handler. Pinning another component's wording here is how the previous
assertion came to be orphaned in the first place.
Swept the rest of the suite rather than assuming this was the only one: of
399 distinct long `.contains("…")` assertions under tests/raw_coverage, 202
name strings absent from `src/`, but all 202 are fixture data — none was
present in `src/` at 2026-08-20 and removed since. Against unfixed main the
same sweep returns exactly one true orphan, this one, which is how I know
the method sees what it is meant to see.
Verified: the target passes with the fix and fails without it, naming this
assertion ("must fail CLOSED on the backing write ...").
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe end-to-end scope coverage test now checks the ChangesComposio scope validation
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to This test-only change re-anchors an assertion without changing product behavior or runtime configuration, so no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Your free Security trial is over. An organization admin can activate billing to continue. Comment |
…osio-scopes-refusal\n\nRe-anchor the composio scopes refusal on the message it now emits\n
Summary
Rust Core Coverageis red on main. This unblocks it."memory client not initialised", a string that no longer exists anywhere insrc/.tests/raw_coveragerather than assuming this was the only one. It is.Problem
1bf2037a0— "Stop booting the second in-process memory engine", merged via #5725 at 2026-08-26 15:39 — removed the in-process engine handle that produced that refusal and movedcomposio.set_user_scopes's storage half onto the bound memory driver. The handler's own comment records the change: "the old code refused with 'memory client not initialised'". The assertion was never re-anchored.It merged green because the coverage lane is changed-modules-scoped (
rust-coverage-changed.sh) and that PR touched nothing routing totests/raw_coverage, so the target never ran. Same shape as #5757 and #5776.Solution
ops::user_scopes::saverefuses on three grounds, kept deliberately distinguishable:memory driver unavailabledoes not serve Graph, cannot persist prefkv_put failed: …I re-anchored on the Graph arm first and it was wrong — the assertion carried the observed value, and the run reported:
The module provider binds and does serve
Graph; the cdylib is simply never loaded in a test binary that runs no boot sequence. So the third arm is correct.Pinned: the
[composio][scopes]tag and thekv_put failedarm. Together those are the fail-closed property — the handler must refuse rather than report a save it did not perform, and it must refuse on the write rather than on either of the other two grounds. The old string satisfies neither, so this is a genuine re-anchor and not a substring that would pass either way.Deliberately not pinned: the reason after the colon. That text belongs to the module loader, not to this handler, and pinning another component's wording here is exactly how the previous assertion came to be orphaned.
Is this the only one?
Swept rather than assumed. Of 399 distinct
.contains("…")assertions of 18+ chars undertests/raw_coverage, 202 name strings absent fromsrc/— but all 202 are fixture data (names, addresses, payload fragments): none was present insrc/at the 2026-08-20 baseline and removed since.Method validated against unfixed
main, where the same sweep returns exactly one true orphan — this one. So it sees what it is meant to see, and there is nothing else of this shape today.Impact
Test-only. No product code, no
vendor/gitlink, no manifest. UnblocksRust Core Coveragefor every open PR.Related
1bf2037a0via Route the recall, reset and flush paths through the contract #5725. No closing keyword — no issue was filed for the red lane.Submission Checklist
## Related— N/A: no matrix feature IDs affected.Closes #NNN— N/A: no issue filed for the red lane; cause named under## Related.AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
fix/reanchor-composio-scopes-refusal2be4c25c1Validation Run
pnpm --filter openhuman-app format:check— N/A: no file underapp/changed.pnpm typecheck— N/A: no TypeScript changed.--test raw_coverage_all -- composio_raw_coverage_e2e→ 24 passed, 0 failed with the product feature set. The single case fails without the fix.src/change; the edited test compiles and runs as above.Validation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Parity Contract
Duplicate / Superseded PR Handling
Revert check
Reverting the assertion to the old string fails the target, naming this assertion rather than incidentally:
Summary by CodeRabbit