Repository navigation
[CTX-0719] feat(sec): adopted SEC seams at live boundaries (OQ-054/055/057/068/083/085) - #1310
Merged
Merged
Conversation
This was referenced Sep 23, 2026
…seams (OQ-054/055/057/068/083/085)
Xuepoo
force-pushed
the
ctx-0719/secwiring
branch
from
September 23, 2026 05:44
e5819a4 to
7be0798
Compare
This was referenced Sep 23, 2026
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.
Priority: P1 | Area: area:security | Labels: feat,P1,area:security | Milestone: v0.1.0 | RFC: OQ-054/OQ-055/OQ-057/OQ-068/OQ-083/OQ-085 (adopted) | Task: CTX-0719
Scope
Wire the owner-adopted SEC directions (register accepted 2026-09-23) into live paths where acceptance demands it: trust-level admission at the effective-authorization boundary, role-contract checks at the same boundary, credential exclusive-or order at the call boundary, the panel write-lease hook, and
.wheel/project-definition discovery. Candidate kernels came from #1304 (zero live consumers); this task adds the consumers plus 25 wiring tests. #1308 (env grants + error taxonomy + tier audit) is in CI and NOT merged: this task deliberately does not duplicate it (see #1091 verdict).Per-issue verdicts
check_family+authorize_with_trustwired and tested, but the security-corpus revision lives inbitty-docsand is not part of this changeapi_key_envvsapi_key_cmdsemanticsresolve_choiceexclusive-or gate implemented and tested, but noapi_key_env/api_key_cmdconfig field exists yet; waits on the provider-schema follow-upcheck_request+authorize_with_rolewired and tested, but the CRE-5 shell write path and thebitty-airole model stay openmay_write/check_writehook implemented and tested, but the bounded lease term, clock, and bus routing stay open; RUN-21 track owned by CTX-0720.wheel/then.agents/discovery implemented and tested, butproject.tomlschema, tracked-vs-state split, and trust enforcement stay openRelates #1090 (HOLD: wired, needs security-corpus revision).
Relates #1091 (HOLD: tier gate lives in #1308, awaiting merge).
Relates #1092 (HOLD: gate ready, needs provider schema).
Relates #1094 (HOLD: wired, needs sandbox/shell-write closure).
Relates #1095 (HOLD: hook ready, needs term/clock/bus).
Relates #1096 (HOLD: discovery ready, needs schema).
Contract outcome
bitty-plugin-hosttrust_levels:CapabilityDomain::for_familyreverse map +TrustLevel::check_familycall-boundary gate (unmapped families defer to grants; sharedTerminalfamily passes on either direction, documented).bitty-plugin-hosteffective:authorize_with_trust+authorize_with_rolewrappers — adopted gates first, then exactlyauthorize; denials arePolicyConflictwith names-only chains.bitty-plugin-hostroles:EnforcementPoint::for_request_kindrouting +AgentRole::check_point/check_requestgates.bitty-plugin-hostcredential_ref:resolve_choiceexclusive-or enforcement (names-only conflict diagnostics, values never enter the module).bitty-runtimeexecution::lease:PanelLease::may_write/check_writeSEC-26 write hook (occupant-only, lease unchanged on deny).bitty-configwheel(new): OQ-068 discovery order (nearest.wheel/project.toml, else nearest.agents/, 32-level bound) withdiscover(injectable predicate) +discover_on_fslive seam; paths only, never read or trusted.cargo +1.85 checkclean on all three touched crates.Security/performance impact
No new authority: every seam narrows (trust/role pre-checks deny before the grant intersection; credential conflicts deny; lease writes require occupancy; wheel discovery returns paths only). No hot-path change: the wrappers are opt-in (existing
authorizeuntouched), the lease hook is additive, wheel discovery runs once per lookup with a bounded walk. No perf-sensitive change.Affected crates
bitty-plugin-host: trust/role/credential gates + effective wrappers + docs/exports.bitty-runtime: lease write hook.bitty-config: newwheeldiscovery module.Validation
cargo fmt --all -- --checkcleanRUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets --lockedcleancargo check --workspace --lockedclean (viacargo check -p bitty-plugin-host -p bitty-runtime -p bitty-config, full workspace clippy covers the rest)cargo test -p bitty-plugin-host --lockedgreen (276 lib passed, incl. 13 new wiring tests)cargo test -p bitty-config --lockedgreen (incl. 7 new wheel tests)cargo test -p bitty-runtime --lib --lockedgreen (504 passed, incl. 2 new lease-hook tests)cargo +1.85 check -p bitty-plugin-host -p bitty-config -p bitty-runtime --lockedclean