Skip to content

feat(profile): add roster-owned run profiles with CAS and audit - #191

Draft
amad-malik wants to merge 8 commits into
mainfrom
nemo/run-profile-store-20261019
Draft

amad-malik wants to merge 8 commits into
mainfrom
nemo/run-profile-store-20261019

Conversation

@amad-malik

@amad-malik amad-malik commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add the storage-A run-profile contract for H-D641/H-D643 to the maintained Cortex v1 API. The existing agents.capabilities row owns the typed desired profile and mutable label; the canonical name@project key stays unchanged.

owner PUT(expected_revision, fields, label)
  lock existing scoped worker
  validate CAS + server attribution
  update capabilities + append before/after team_event atomically
GET profile / history; existing project vault export / restore

Registration cannot bypass the protected profile/label writer, ordinary log/sync inputs cannot forge profile audit events, and unset or corrupt profiles refuse without a provider/model fallback. No migration, new store, model catalogue, native launcher or live deployment is included.

Open read seam: addendum a7e2871e requires current execution grant + authorization revision. This desired-profile DTO does not supply them. Consult 3d68bda3-2171-48bb-883f-5d9f94b2bdcc asks Kai for the admitted authority/writer/version/revocation binding; desired permission and HTTP API scopes must not be treated as native grants. Do not connect the current reader as launch authorization.

Open cutover: the chosen KOS path is retirement of profile-only agent_settings authority. Its legacy writers/reads are not retired by this Cortex-only PR; reconciliation and the coordinated KOS/Pike resolver binding remain required before pilot enablement. docs/run-profile-v1.md specifies the API and one-writer cutover contract. DFP-03 native effects and full claim/run/outbox integration remain separate acceptance gates. Request one code-only review from Hale through Kai.

Evidence

  • Before: 22 HTTP contract tests failed by assertion on missing routes or registration bypass; public audit-event forgery had two deciding failures; deactivation wrongly blocked history in one deciding failure. RED commits precede the fixes. Catalogue model context suffixes are preserved exactly.
    After: 72 focused tests pass on this Mac, including real private PostgreSQL concurrent CAS, audit-trigger rollback, identity/label history and project export/restore. The fixture uses invented identities and a unix-only disposable cluster, never a live DSN. The existing offline gate passes all 145 tests with zero skips/deselections.
  • Added a Linux CI job running the focused suites against PostgreSQL 16. All seven checks passed on exact head 627b7b1: ci run 39188036308 and next-offline run 39188036312 (Python 3.13.7/3.14.0).

Merge Danger

Door: two-way

No schema/data migration or live service change. Source rollback is straightforward; preserve any later configured profile/history data. Deployment of the Helix projection is a separate Kai/CTO step. Keep pilot dispatch disabled until the KOS one-writer cutover and resolver/native gates are complete.

Blast Radius: roster

New owner-authorized profile routes, reserved capability keys and audit event type affect v1 roster/profile writers; legacy profile authorities still need coordinated retirement.

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.

1 participant