Why: the project access and lifecycle units (U1 role narrowing to a single
project-access boolean, U2 creator authority, U3 member history, U4 project
work states) were implemented and pushed on this line but never landed on
Backend main, so Dev's pinned Backend does not contain them.
Evidence: merge is conflict-free against current origin/main; full
vet-and-test runs on the merge commit.
Impact: Backend only. RDM side is delivered separately.
Refs: Dev PR #634.
Why: compose the lifecycle line (role narrowing to a single project-access
boolean, U3b member-history read path) with Backend main (capability
association, explanation, super-admin). Per plan 2026-10-19-1440 R2/KTD2
the narrowed single-boolean write model supersedes the linked-cap expansion
and its association invariant; main non-conflicting work (explanation,
super-admin, tavily, O2 pins) is incorporated.
Impact: integration merge on the lifecycle branch; suites arbitrate.
Why: the U4 branch is 89 commits behind main, which now carries the shared
document renderer, two-trees project work, the SQLite instance guard and
exec env layers (PR #209 merged as c76d8bd); it conflicted in storage
migrations, host capabilities and the extension surface. The user authorized
syncing U4 after the renderer line on 2026-10-18.
Evidence: content is the agent-exec transport 3b64eb5 (cursor worker, unit
backend-iam-u4-onto-main-c76d8bd-r1, run on a checkout whose tree equals main,
receipt /tmp/cleanup-20261018/render/u4-backend-onto-run.json, SELF). Host
check: main migrations 1-48 unchanged (migrate.go has no deleted lines versus
main), U4 migrations moved from 35-36 to 49-50 with identical SQL,
surface.txt is the sorted union, deps stay at main's pins.
Impact: databases that ran unmerged U4 builds with the old numbering must be
recreated. SurfaceVersion becomes 2.25.0-experimental. Main's admin password
account creation now requires the system.users.create action like the other
U4 account writes.
Refs: Backend main c76d8bd, PR #209
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: PR #209 is behind main by 14 commits (admin passwords, managed
interpreter path, U8 SQLite instance guard, EXT-20 regulations) and conflicted
in app wiring, host capabilities, migrations and the extension surface; the
user authorized merging the renderer line on 2026-10-18.
Evidence: content is the agent-exec transport 87a99ece (cursor worker, unit
backend-task10-sync-main-56a7f9f-r2, receipt
/tmp/cleanup-20261018/render/backend-sync-run2.json, SELF): gofmt, go build,
go vet and go test ./... (43 packages) passed. Host check: main migrations
1-36 unchanged, feature migrations moved from 36-47 to 37-48 in order with
identical SQL, surface.txt is the sorted union.
Impact: main's migration 36 instance_guard stays authoritative; databases that
ran unmerged feature builds with the old numbering must be recreated.
SurfaceVersion becomes 2.24.0-experimental.
Refs: PR #209, Backend main 56a7f9f
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Integrate the exact Dev main pin while preserving trusted project context, vision routing, work-result context, and distinct migration identities.
Evidence: go vet ./...; go test ./... -count=1; go build ./...; CGO_ENABLED=0 go build ./cmd/agent-system; isolated PostgreSQL migration history tests.
Impact: Keep exec_env_layers at schema v35, move the feature migrations to v36-v46 in order, and fail closed on the old unpublished numbering.
Refs: 14e780c6fa32fdd4742b6232150c5efcb0d766ff; ab12fea474
Why: The sandbox hides the host home directory and has no network, so pip install --user cannot supply python-docx, and the service PATH resolved python3 to a linuxbrew path that does not exist inside the sandbox.
Evidence: SELF go test of execenv, tools, store, app, server, runmgr, config, and cmd/agent-system on this worktree. CI has not run.
Impact: Sessions inherit a read-only base layer. Extra packages are requested through python_env, auto-approved only from the allowlist, and mounted per conversation. Schema 35 adds the request and binding tables.
Refs: .task/feature-layered-python-env.md
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: The active secret_keys row overrides settings plaintext, so a replaced chat key kept returning 401. Migration also mutated the settings map in place, so clearing a matching plaintext never reached the database.
Evidence: go test ./internal/settings/ ./internal/runtime/ -count=1 (SELF, worktree).
Impact: System settings writes adopt a changed secret; conflicting plaintext is kept and logged; 401 errors name the key layer and an 8-hex fingerprint.
Refs: fix/model-key-secret-overlay
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: The real local-mode product has authoritative project access without an enabled account-model row.
Evidence: The app suite passes; non-local missing or disabled accounts still fail closed.
Impact: Auth-off local acceptance can record a nonempty authorization epoch while authenticated deployments retain account-version binding.
Refs: TT-N03
Why: Direct HTTP and surface command dispatch could mutate RDM project facts without an analyzed committed-message manifest.
Evidence: Command-bus, server, and app suites pass with a classification regression for formal writes and read/proof exceptions.
Impact: Formal HTTP writes require a conversation anchor and committed proceed decision; surface writes fail closed until they can carry the same proof.
Refs: TT-N03 TT-R01
Why: Direct search, exec, fetch, and MCP providers could return project-driving results without entering the trusted source observation gate.
Evidence: App and run-manager suites pass with project runs confined to the audited runCtx tool path.
Impact: Non-project native runs retain configured tools; project runs fail closed until native result hooks can prove durable observation.
Refs: TT-N03 TT-R01
Why: Accepted retrieval and tool sources could become stale, and a pending HITL answer could release a changed source set.
Evidence: App and run-manager suites cover per-preflight resource verification, authorization epochs, and a second exact-source preflight after HITL.
Impact: Project work fails closed when authorization, source bytes, run binding, or the source watermark changes.
Refs: TT-N03 TT-R01
Why: A model-visible flag cannot prove that a person confirmed one proposal revision and payload hash.
Evidence: go test ./pkg/extension ./internal/app ./internal/server -run 'HumanDecision|SurfaceSnapshot|ResolveHuman|NaturalLanguage' passed locally.
Impact: SurfaceVersion 2.22.0-experimental adds HumanDecisionVerifier. Existing Host methods stay unchanged, and the base does not consume the proof.
Refs: W4b human confirmation design r1
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Independent review found delegated account actions, stale resource policy, and role migration cutover gaps in the initial U4 implementation.
Evidence: Backend full SQLite suite passed; isolated PostgreSQL role and migration suite passed; independent final review found no remaining findings.
Impact: Enforces transactional system grants, current role snapshots, staged role import with v36 migration, and fail-closed activation.
Refs: feature/iam-u4-role-authority
Why: Existing RDM role commands must reach the Backend authority during UI and migration cutover without dual-writing RDM role tables.
Evidence: The full Backend suite passed, including actor-bound role administration, owner compatibility, provider, and public-surface tests.
Impact: Adds temporary trusted Host administration methods and completes the project-action catalog used by RDM.
Refs: Focused role and permission system task 5
Why: RDM needs a trusted, non-secret view of Backend-owned role policy without importing Backend internals or accepting a caller-supplied actor.
Evidence: The full Backend test suite passed, including public-surface and provider contract tests.
Impact: Adds optional extension surface 2.14 with actor-bound role snapshots and action decisions.
Refs: Focused role and permission system task 4
Why: Project messages, retrieved evidence, tool results, and final replies must not affect model work or reach users before the domain risk decision is complete.
Evidence: RED tests proved the runner, final reply, and message deltas advanced before the gate; focused tests, go test -p 1 ./..., go build ./..., and isolated PostgreSQL runtime tests now pass.
Impact: Wire the optional RDM observer into project run start, retrieval, tool-result, HITL clarification, and final reply buffering; hosts without the optional provider keep existing behavior.
Refs: TT-N03, TT-R01; approved work-observation design and stage-five plan
Why: Project retrieval hits, tool results, and saved visible analysis must be individually traceable and fully analyzed before later project actions consume them.
Evidence: RED tests first showed missing run-source capture, tool-result capture, and run-wide preflight; go test -p 1 ./... and go build ./... passed; isolated PostgreSQL source, migration, audit, and context tests passed.
Impact: Persist actual run-bound sources with current-status checks and exact manifests behind the disabled X3 assembly gate; no live product path, migration, deployment, or release is enabled.
Refs: TT-N03, TT-R01; approved X3 stage-five plan r1
Why: A durable observation receipt must not be mistaken for completed risk analysis or permission to execute a project action.
Evidence: Exact-source preflight tests cover pending versus proceed, partial attachment, post-ACK source tampering, current authorization, and receipt idempotency; go test -p 1 ./... and go build ./... passed.
Impact: Add a fail-closed host preflight helper and per-message manifest read, still unwired to the public product path pending recovery and four-route coverage.
Refs: TT-N03, TT-R01; approved X3 design r1
Why: Project user messages and final assistant replies need exact, replayable source parts before a domain observer can safely analyze them.
Evidence: go test -p 1 ./... passed; isolated PostgreSQL outbox, audit, migration, and work-context tests passed against a temporary cluster; request dedup, fenced settlement rollback, authorization recheck, and receipt idempotency tests passed.
Impact: Add migration 44 and a private host outbox for committed message parts; actual observer delivery and action preflight are not yet wired into the product path.
Refs: TT-N03, TT-R01; approved X3 stage-five plan r1
Why: X3 must share one Backend surface with the X1 context and X2 audit candidates while current main now owns account migrations 32-34.
Evidence: go test -p 1 ./... and go build ./... passed on the merged tree; isolated PostgreSQL project audit, migration, and work-context tests passed against a temporary instance. Default parallel go test ./... had only the unrelated sandbox orphan timing test fail; its isolated ten-run replay passed.
Impact: Preserve account migrations 32-34, place X1/X2 migrations at 35-43, and retain account-effective write guards alongside project audit/context behavior. X3 observer remains a contract only.
Refs: TT-C01-TT-C04, TT-A01-TT-A04, TT-N03, TT-R01; combination probe d9b00c2
Why: Real project messages and retrieved material need a scoped observer and preflight decision contract before they can become governed project candidates.
Evidence: Registration denial test was RED before the implementation; go test ./... passed on Backend origin/main 2716b9e.
Impact: Add public X3 types and trusted single-provider registration; the production observer slot is deliberately not wired yet, so no project observation behavior is claimed.
Refs: TT-N03, TT-R01; approved work observation stage-five plan r1
Why: RDM delegated rename rebuilt the creator Host and could commit a Backend project rename after the delegated operator was disabled.
Evidence: SQLite and isolated PostgreSQL targeted checks cover operator/creator disable order, two processes, sorted locks, auth-off local compatibility, and HTTP/command Host wiring; exact committed-head replay remains pending.
Impact: Adds a request-bound single-project extension capability and checks operator plus creator in the final Backend transaction. Global ScopedHost cannot derive delegated authority; RDM cross-database atomicity remains outside the promise.
Refs: Approved Documents delegated-projection amendment 5783940, U3 A1-A4 candidate adcd8fe, Dev feature/iam-u3-account-directory-recovery.
Why: Account disable could be followed by late Backend business writes, API key creation could implicitly create users, account bootstrap locks could invert, and directory cursors were process-local or leaked out-of-scope changes.
Evidence: Local go test ./... and isolated PostgreSQL package suites passed on the staged candidate; exact committed-head SELF replay and stage 6 human review remain pending.
Impact: Adds final account transactions and external-effect checks across HTTP, Host, Bus and run manager; tightens API key issuance and persists versioned cursor signing. Delegated RDM rename still needs the separately proposed real-operator contract, so A1 and stage 6 are not complete.
Refs: Documents U3 r1, approved A1-A4 amendment fb3a821, pending delegated-projection amendment 5783940, Dev feature/iam-u3-account-directory-recovery.
Why: Both approved Backend slices share extension surfaces and migration numbers, and current main added account audit v31.
Evidence: The isolated probe resolves additive interfaces and v31-v40 ordering; focused and full Go tests passed without PostgreSQL.
Impact: Produces a local integration candidate for isolated PostgreSQL and race verification only; shipping branches remain unchanged.
Refs: feature/rdm-two-trees-latest-templates W6 W9
Why: Validate W6 against account-audit migration v31 on the current authoritative base.
Evidence: Focused store/runmgr/migrator and full Go tests passed in the isolated probe after resolving migration collisions.
Impact: Renumbers unpublished W6 migrations to v32-v36; this probe commit is not a shipping branch or live migration.
Refs: feature/rdm-two-trees-latest-templates W6 integration probe
Why: Explicit low IDs bypassed the implicit sequence allocator and could commit after a higher audit page cutoff.
Evidence: Isolated PostgreSQL RED receipt for cross-page omission; local GREEN for explicit and default writes, trigger drift, isolation, mutation denial, offline copy rollback, retry, and sequence non-rewind. Fixed-HEAD receipts follow.
Impact: Add v34 all-writer and append-only guards; reject unsafe strong reads; make command audit storage migration exclusive and atomic with guard restoration and a forward-only sequence.
Refs: Approved W9 all-writers cutoff adjustment r1; W9 Backend task card.
Why: PostgreSQL sequence IDs could commit out of order and make fixed project audit cursors permanently skip a late row.
Evidence: SELF PG cross-page RED, CACHE 10 counterexample, configuration drift RED/GREEN, and pre-commit Go, PG migration, and race receipts are recorded in the W9 task card. Fixed-HEAD checks follow this commit.
Impact: Guard implicit command audit ID allocation with a transaction advisory lock; reject unsafe sequence/default drift; preserve explicit-ID storage migration; report committed-prefix only for verified project pages.
Refs: Approved W9 PostgreSQL cutoff adjustment r1; W9 Backend task card.
Why: Goal-sensitive workflow verification persisted model prompts and prior output text in trusted receipt rows, while cross-step model inputs could reuse stale machine output.
Evidence: RED receipt privacy test; full Go suite, targeted race, isolated PostgreSQL store/runmgr/storage-migrate tests, vet, and static build passed locally before commit. A known unrelated TempDir cleanup flake failed once and passed on targeted and serial full replay.
Impact: Add optional same-provider source recheck, verify every included item and evidence body before reuse, gate cross-step outputs, reject unsettled attempts, remove raw scope columns, scrub isolated candidate v34 SQLite/PG schemas, and reject unsafe backups.
Refs: Approved RDM stage6 W6 source-recheck design adjustment r1; W6 independent review.
Why: U7 account audit and identity gates advanced on main while U3 account initialization and recovery were in progress.
Evidence: SELF merge-tree checks passed with go test ./... and isolated PostgreSQL store/server tests; exact-head replay follows.
Impact: Preserve pending-account grants, proof-linked recovery, protected CLI delivery, account serialization, and atomic audit.
Refs: IAM U3 r1; U7 PR #185
Why: A disable could commit after the run manager checked account state but before its final business message was stored.
Evidence: SELF receipts /tmp/iam-u3-final-settle-sqlite.json, /tmp/iam-u3-final-settle-pg.json, /tmp/iam-u3-backend-settle-all.json, /tmp/iam-u3-backend-settle-pg.json, and /tmp/iam-u3-http-two-instance-pg.json.
Impact: The final run transaction locks and rechecks the account, rejects post-disable business output, and permits only an account-denial failure record. Auth-off implicit local ownership remains explicit.
Refs: IAM U3 r1 stages 4-5; Dev feature/iam-u3-account-directory-recovery
Why: Revoked project material could remain in later model turns, and plugin Audit could impersonate a model-input manifest.
Evidence: SELF red tests reproduced both paths; updated project revocation, trusted receipt, migration, and entrypoint tests pass locally with go test ./... -count=1 and targeted race checks.
Impact: Rebuild direct model requests after scope changes, sanitize or block unproven generic history, omit legacy project injections, and persist manifests in a dedicated state-checked table.
Refs: TT-C02 TT-C03 TT-C04; stage5 W6; review P1 stale context and manifest provenance
Why: Clock-derived IDs could collide and string-scoped hosts could impersonate a registered audit publisher.
Evidence: Fixed-clock concurrent, ambiguous private offset, forged scoped-host, and registered publisher RED-to-GREEN tests; go test ./... -count=1 and targeted race test passed locally as SELF.
Impact: Generate 192-bit host IDs, reject ambiguous explicit offsets, and issue a publication-only capability at verifier registration.
Refs: Stage 5 W9; approved Stage 6 audit-link design adjustment r1; review of a8fa2fe