feat(mosaic): govern credential lifecycle and fail-closed identity #1058

Closed
Mos wants to merge 13 commits from feat/1045-mosaic-cred into main
Contributor

Summary

Implements the governed mosaic cred lifecycle for explicit identity, estate, and host boundaries:

  • provision, wire, grant, get, validate, whoami, list, rotate, revoke, and audit
  • strict estate registry plus canonical resolveByHost(host) reverse lookup for MB-BRAIN-01
  • protected inherited-fd delegated Basic authority; secrets excluded from argv, environment, logs, journals, and normal output
  • atomic credential envelopes, guarded legacy compatibility, host-qualified Tea registration, and generation-aware revoke/rotate
  • provider-object acceptance for token scope, identity, repository permission, direct/team grants, and write differential controls
  • durable pre-mutation journals with provider evidence, corrections, and fail-closed fault handling
  • identical fleet git/API refusal markers and per-invocation identity/shared-path tracing for #1044
  • team mutation serialization, pre/post scope read-back, and verified compensation
  • authenticated exact-seat wire with roster/path binding, target-inode revalidation, atomic replacement, and parent-directory fsync

Refs #1045. Consumer contract: #1051. Related fail-closed verification: #1043 and #1044.

Author-run verification at exact head

Head: f2666d7da9d552d14d9b424eb606d0f835164f95

  • branch ancestry: origin/main is an ancestor; merge-base is 5916aeefd6ed12bcac086c6834c7f6c4ae38e1bc
  • scope: 13 lane commits / 41 changed files / zero inherited next commits
  • focused credential and command tests: 80/80 across 11 files
  • package typecheck, lint, format, and build: green
  • pre-push hook: checkout preflight green; monorepo typecheck 45/45 tasks; monorepo lint 25/25 tasks; format green
  • full package Vitest: 1,578 passed; three unrelated CLI-smoke failures were caused by the installed-version update banner writing to stderr
  • live v1.5 reconciliation: 13/13 capability probes confirmed; identity measured for 8; four least-privilege subjects correctly reported NOT-MEASURED; gitea-mosaicstack-mos-admin.token read back as Mos

These are author-run checks, not independent approval. Exact-head CI and independent reviews remain required.

Advisory Codex reviews at exact head

These reviews are author-run second signals and explicitly not independent approval.

Code review: review-evidence/code-review-f2666d7d.jsonrequest changes

  1. Blocker: provisioning rollback suppresses Tea removal failure and can overstate rollback completeness.
  2. Should fix: failed Tea writes/removals can leave secret-bearing temporary files.
  3. Should fix: global Git helper identity validation can interfere with unsupported hosts before yielding to another helper.

Security review: review-evidence/security-review-f2666d7d.jsonmedium risk

  1. Legacy token compatibility does not yet enforce the same explicit estate binding as credential envelopes.
  2. cred get may disclose to its protected output fd before the final issuance journal append/seal; post-write audit failure needs explicit possibly-issued mutation semantics.

Reviewers should validate and disposition these findings; this PR does not represent them as resolved.

Measured provenance deviation

All 13 commits have author be-coder-06 <[email protected]>, preserving Gate-16 author identity. Six early commits have the shared host default as committer (Hermes Agent <[email protected]>):

  • 1e58e6c74a18338656345bba99b15f544b808df1
  • 2419313286b5e127401ddaa3d94a433c0033fbc1
  • 050ac63737e1b3b8606fe944a8778c96d71a4d80
  • f705800353b2f20302790b32d1dc5b9a9abb627b
  • 59cde3d199ab5eb631d2b181a72ebba79a90f70b
  • 178a7b7117359f5c006a3f7b6b41a407e1e8b3eb

The remaining seven commits use be-coder-06 as both author and committer. This is disclosed rather than history-rewritten because rewriting would void all SHA-bound evidence. Reviewers may require a different disposition.

Completion boundary

  • target is main; C1 remains sequencing-prior
  • no self-merge
  • independent author≠reviewer code approval and mandatory security approval remain open
  • final #1044 verification must be re-run against the exact merge-eligible SHA
  • #1045 does not close at merge; status remains believed-fixed, pending jarvis validation
## Summary Implements the governed `mosaic cred` lifecycle for explicit identity, estate, and host boundaries: - `provision`, `wire`, `grant`, `get`, `validate`, `whoami`, `list`, `rotate`, `revoke`, and `audit` - strict estate registry plus canonical `resolveByHost(host)` reverse lookup for MB-BRAIN-01 - protected inherited-fd delegated Basic authority; secrets excluded from argv, environment, logs, journals, and normal output - atomic credential envelopes, guarded legacy compatibility, host-qualified Tea registration, and generation-aware revoke/rotate - provider-object acceptance for token scope, identity, repository permission, direct/team grants, and write differential controls - durable pre-mutation journals with provider evidence, corrections, and fail-closed fault handling - identical fleet git/API refusal markers and per-invocation identity/shared-path tracing for #1044 - team mutation serialization, pre/post scope read-back, and verified compensation - authenticated exact-seat `wire` with roster/path binding, target-inode revalidation, atomic replacement, and parent-directory fsync Refs #1045. Consumer contract: #1051. Related fail-closed verification: #1043 and #1044. ## Author-run verification at exact head Head: `f2666d7da9d552d14d9b424eb606d0f835164f95` - branch ancestry: `origin/main` is an ancestor; merge-base is `5916aeefd6ed12bcac086c6834c7f6c4ae38e1bc` - scope: 13 lane commits / 41 changed files / zero inherited `next` commits - focused credential and command tests: 80/80 across 11 files - package typecheck, lint, format, and build: green - pre-push hook: checkout preflight green; monorepo typecheck 45/45 tasks; monorepo lint 25/25 tasks; format green - full package Vitest: 1,578 passed; three unrelated CLI-smoke failures were caused by the installed-version update banner writing to stderr - live v1.5 reconciliation: 13/13 capability probes confirmed; identity measured for 8; four least-privilege subjects correctly reported NOT-MEASURED; `gitea-mosaicstack-mos-admin.token` read back as `Mos` These are author-run checks, not independent approval. Exact-head CI and independent reviews remain required. ## Advisory Codex reviews at exact head These reviews are author-run second signals and explicitly **not** independent approval. Code review: `review-evidence/code-review-f2666d7d.json` — **request changes** 1. **Blocker:** provisioning rollback suppresses Tea removal failure and can overstate rollback completeness. 2. **Should fix:** failed Tea writes/removals can leave secret-bearing temporary files. 3. **Should fix:** global Git helper identity validation can interfere with unsupported hosts before yielding to another helper. Security review: `review-evidence/security-review-f2666d7d.json` — **medium risk** 1. Legacy token compatibility does not yet enforce the same explicit estate binding as credential envelopes. 2. `cred get` may disclose to its protected output fd before the final issuance journal append/seal; post-write audit failure needs explicit possibly-issued mutation semantics. Reviewers should validate and disposition these findings; this PR does not represent them as resolved. ## Measured provenance deviation All 13 commits have author `be-coder-06 <[email protected]>`, preserving Gate-16 author identity. Six early commits have the shared host default as **committer** (`Hermes Agent <[email protected]>`): - `1e58e6c74a18338656345bba99b15f544b808df1` - `2419313286b5e127401ddaa3d94a433c0033fbc1` - `050ac63737e1b3b8606fe944a8778c96d71a4d80` - `f705800353b2f20302790b32d1dc5b9a9abb627b` - `59cde3d199ab5eb631d2b181a72ebba79a90f70b` - `178a7b7117359f5c006a3f7b6b41a407e1e8b3eb` The remaining seven commits use `be-coder-06` as both author and committer. This is disclosed rather than history-rewritten because rewriting would void all SHA-bound evidence. Reviewers may require a different disposition. ## Completion boundary - target is `main`; C1 remains sequencing-prior - no self-merge - independent author≠reviewer code approval and mandatory security approval remain open - final #1044 verification must be re-run against the exact merge-eligible SHA - #1045 does **not** close at merge; status remains **believed-fixed, pending jarvis validation**
Mos added 13 commits 2026-08-05 19:34:31 +00:00
be-coder-06 closed this pull request 2026-08-05 19:40:57 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.