Skip to content

Store operator gaps: audited record moves, --actor, bounded filters, declared targets in explain/manifest/context/review (#875) - #885

Merged
jimhoyd merged 2 commits into
mainfrom
claude/store-operator-gaps
Sep 29, 2026
Merged

jimhoyd merged 2 commits into
mainfrom
claude/store-operator-gaps

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes #875 items 1, 2, 4 and 5. Item 3's options are on the issue.

  • 1. Audited record moves. reassign writes store.record.reassigned ({collection, from, to}) for each moved record in audited owned collections, in the same transaction as the moves.
    • All checks run before any write. A new backlog check refuses with 503 audit_backlog, writing nothing, when the waiting events plus the planned ones would exceed 1000 (dry runs too). So one command changes at most 1000 records of an audited collection.
    • ownerless-assign and ownerless-delete are audited too.
    • Breaking: those two now need --project and an ownership: owner collection.
  • 2. --actor <id>. Accepted on the store operator commands that write, validated as a principal id, default operator. Documented as operator-asserted, not authenticated.
  • 4. Declared targets without a host file. explain, manifest, context and review now use the installed descriptors' declared targets, like validate and capabilities.
    • Manifest schema v3 → v4: each target's compatibility gains a refused count.
    • review --target findings carry refusedOn.
  • 5. Bounded filters. Filter values outside minimum/maximum, minLength/maxLength or format are 400 invalid_query on owner and readers mounts. The value is never echoed.

Evidence (macOS, Node 26)

  • npm run verify passes (root 1151, store 138). test:proof 12. test:package passes.
  • audit:packages passed after the core unpacked budget was raised to 3584 KiB (measured 3,664,264 bytes).
  • New operator-audit.test.ts:
    • reassign events, with rollback on an injected outbox failure;
    • backlog refusal writes nothing, and a command exactly at the limit succeeds;
    • --actor validation and scope;
    • bounded filters.
  • The new CLI tests in test/capabilities.test.ts cover explain, manifest, context and review.
  • Store is 86 bytes under its unpacked budget, and Store: 'may' — the transitions the caller may run, on list and record answers (#873) #884 also touches store, so whichever merges second will need to re-measure.

🤖 Generated with Claude Code

…lters, descriptor targets in explain/manifest/context/review (#875)

- reassign records store.record.reassigned per moved record on audit: true
  owned collections ({collection, from, to}); ownerless-assign/-delete record
  reassigned/deleted events. Events are counted first and the whole command
  is refused with 503 audit_backlog (dry runs too) before writing when they
  would pass the outbox backlog. The reassign report adds auditEvents.
- --actor <principal id> on every writing operator command (default
  operator); operator-asserted, not authenticated.
- Breaking: ownerless-assign/-delete need --project and an ownership: owner
  collection; assignOwnerless/deleteOwnerless take an options object.
- Breaking: a filter value outside minimum/maximum, minLength/maxLength or
  format is 400 invalid_query (write-path message, value never echoed).
- explain, manifest, context and review use installed descriptors' declared
  targets without a host file; manifest targets add refused (schema 4);
  review --target marks refusedOn.
- Core unpacked budget 3584 KiB (measured 3664264 bytes).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Store operator gaps: reassign audit events, operator attribution, CLI event delivery, targets in explain/review, range filters

1 participant