Why: Resume the long-running two-tree and renderer task on the current Dev baseline without dropping project context, audit, human-decision, layered-environment, plugin or service changes.
Evidence: Backend merge 92f9286 preserves both lines and passes full vet/test/build plus isolated PostgreSQL migration tests; Documents merge c313639 is conflict-free; tests.test_svc passes 23 cases.
Impact: Resolves Backend/Documents gitlinks and the svc fixture, adopts current Core/Frontend/UI pins, and leaves Task 10 implementation separate.
Refs: task-sync for feature/rdm-two-trees-latest-templates
Why: env ensure downloads an interpreter and wheels. The real-combination start test allows 120 seconds, and that download made rc1 start time out.
Evidence: CI job 5184 timed out in test_U3_real_agent_identity_lifecycle_sqlite on scripts/svc.sh rc1 start.
Impact: Start only mounts a base layer that already exists. The first build is an explicit env ensure, run outside start.
Refs: Agent-System-Dev pull 570
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: The dependency layer already existed in the backend, but service startup never passed it, so the sandbox could not import the packages the host already had.
Evidence: SELF go tests recorded on the backend commit. svc.sh only exports the env root after env ensure leaves a current base layer, and a failed download does not block startup.
Impact: Instances share runtime/envs. Existing exec= lines are left as stored. Proposal, backend, and frontend gitlinks move to this branch.
Refs: .task/feature-layered-python-env.md
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=dc86a023605d00fccca1b9679b4cdad96373bdee.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: Settings plaintext loses to secret_keys, so replacing the env key did not change the key a conversation actually sent.
Evidence: python3 -m unittest tests.test_svc.SvcDbRecoveryTests.test_seed_replaces_old_system_secret tests.test_svc.SvcDbRecoveryTests.test_seed_warns_when_old_secret_stays_active tests.test_svc.SvcDbRecoveryTests.test_seed_puts_without_credentials_when_auth_off (SELF).
Impact: Embedded databases now compare the active system secret fingerprint after seeding, and the backend gitlink carries the adoption fix.
Refs: fix/model-key-secret-overlay
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: PR #567 CI runs without a global Git user identity, causing every successful agent transport commit to fail with exit 128.
Evidence: The focused no-identity regression plus AgentExecControllerTests and AgentExecHistoryTests pass (30 executions total); git diff --check passes.
Impact: Supplies a deterministic non-secret identity only to git commit-tree; routing, receipts, and transport validation are unchanged.
Refs: #567
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=919f75cf7b39ca357e212a08a0ba5ba3d9a79b51.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: retain which CLI handled each task so routing can improve from real outcomes over time
Evidence: AgentExecHistoryTests and git diff --check
Impact: appends sanitized source-external JSONL records without changing run outcomes
Refs: feature/goal-first-delivery
Why: make the three approved CLIs the only active implementation and test routes
Evidence: adapter unit tests, configuration validation, diff check, and real marker probes for all three profiles
Impact: narrows project routing and fixes agy prompt binding for noninteractive execution
Refs: feature/goal-first-delivery
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=692735e91d6a9ab07ddd3686feb60a56b270728a.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: The dev service is an rdm build, so startup skipped model seeding and kept the old MiniMax chat model. Later starts need the saved env file applied even without an admin key command.
Evidence: seed and rdm launcher tests passed. The live dev database now uses the four-model chat route and keeps the original MiniMax endpoint as reserve.
Impact: Restart of a service with envfile set rewrites system model settings. HTTP seeding is unchanged for builds that can mint an admin key. MiniMax is stored separately because fallbacks cannot switch gateways.
Refs: .task/feature-four-model-vision.md
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Hide provider-specific noninteractive, model, permission, workspace, prompt, and output differences behind one adapter seam.
Evidence: Cursor observed red then 22 green config/adapter tests; the host replays them and whitespace checks during integration.
Impact: Adds deterministic direct-argv adapters and probes without launching providers or enabling project routing.
Refs: docs/superpowers/plans/2026-10-15-project-agent-execution.md
Why: Establish one validated project-local routing document before any real Agent execution is enabled.
Evidence: Cursor observed red then 12 green configuration tests; the host replays those tests, the temporary validation target, and whitespace checks during integration.
Impact: Adds the U1 configuration contract and parser only; real routing, adapters, controller execution, and governance adoption remain disabled.
Refs: docs/superpowers/plans/2026-10-15-project-agent-execution.md
Why: Chat, lightweight, fallback and vision settings need a seed path, and the backend now sends current-turn images only to models declared capable of seeing them.
Evidence: The backend change is cfde38d. The seed test covers fallback and vision settings. A local image conversation on each builtin profile returned the pictured content from the expected model, and removing the chat model from the capable list switched that turn to the vision model.
Impact: New runs can use the four builtin profiles and image input. Secrets stay in the ignored env file. The live 8788 process is unchanged.
Refs: .task/feature-four-model-vision.md
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Ensure implementation authorship is delegated per unit while the primary model remains responsible for planning and delivery management.
Evidence: The focused task-card generation regression went red then green, and git diff --check passed.
Impact: Every repository-writing implementation unit gets a fresh Cursor CLI run; unavailable or failed Cursor work is recorded as a blocker instead of being silently implemented by the primary model.
Refs: .task/feature-goal-first-delivery.md
Why: Keep authorized work focused on its stated outcome, prevent private scope expansion, and remove mechanical human stage gates.
Evidence: make test-governance passed 344 tests with 18 environment-dependent skips; receipt is recorded in the task card.
Impact: New tasks use goal-first execution while retaining real decision points, independent review, evidence, platform admission, and high-consequence dual keys.
Refs: .task/feature-goal-first-delivery.md
Why: deploy needs to choose registered plugins and ship them inside one agent-system, then refuse the release when they are not active.
Evidence: python3 -m unittest tests.test_svc_plugins tests.test_svc_user_help tests.test_svc tests.test_svc_u2 (SELF, 63 passed, 1 skipped). Real compose build and make test-lifecycle are NOT_RUN.
Impact: --with is mutually exclusive with --from rdm and --from release. Existing non-interactive deploys stay without plugins unless plugins= is already recorded. Changing the plugin id set on a live service requires --allow-source-switch.
Refs: .task/feature-svc-plugin-compose.md modules/documents/docs/proposals/2026-10-14-svc-plugin-compose-deploy.md
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: The authoritative target advanced while this task recorded approved source and risk requirements.
Evidence: Documents HEAD merges both the task branch and incoming 46506aec34a8803d1b7f4de1a048de9dba591da2 pin; the staged superproject diff has no whitespace errors.
Impact: Include upstream task cards, Backend pin, governance changes, and this task Documents branch without rewriting approved records.
Refs: task-sync; stage 4 work observation review
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=11aa76a3bc1c5047791f9a2de154e451634b6567.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: card_merge only recognized "Merge ... from <branch> into main"
merge commits, so a PR landed as a squash (real case: #457) left its
task card in .task/ forever; task-close reported nothing to close and
precheck showed no debt. Closing required a manual backfill (PR #541).
Evidence: card_merge now returns sha|subject|pr and falls back to a
Gitea API lookup by head ref or label (deleted branches keep the
original name only in label), gated by merge_commit_sha ancestry in
origin/main; precheck [cards] reuses card_merge so both surfaces agree.
Live probe against production Gitea returns 226a4af15791|Reset
per-service runtime state in svc.sh env_config|457 for
feature/svc-pidcheck-leak; stub-server tests cover squash landing,
decoy skip and the not-on-main refusal; full governance suite follows
in-card evidence.
Impact: scripts/task.sh close and precheck detect squash-merged cards
when GITEA_TOKEN is set (merge-commit path unchanged without token);
tests/test_task.py adds two regressions; no protocol change for
existing merge-commit closures beyond the appended pr field.
Refs: card-merge-misses-squash-merges (memory); PR #541 manual closure.
Why: F2 token extraction predates the two-section (HOME/IMC) layout of
~/.secrets/gitea so it concatenated both tokens and always failed; F6
registered a grep BRE alternation that facts-verify unescapes into a
literal pipe, failing re-verification and misaligning precheck's naive
pipe split into a spurious F6 date-format expiry warning, while both
underlying facts still hold.
Evidence: make facts-verify now 6/6 PASS with last_verified refreshed
to 2026-10-14; new regression test for escaped pipes in facts rows;
full governance suite 342 tests OK (18 skipped); precheck [facts] line
reports all facts fresh on the fixed parser.
Impact: policy/facts.md F2 (HOME-section awk extraction) and F6
(negated pipe-free grep); scripts/task.sh precheck neutralizes escaped
pipes the same way facts-verify does; tests/test_task.py covers it.
Refs: precheck WARN 过期事实 F6(日期格式); AGENTS.md 证据与验证门禁.
Why: pipefail treated a recent merged-card match as a failed git log after grep exited early, hiding completed cards from precheck and task-close.
Evidence: A disposable long-history regression failed before the fix and passed after it; make test-governance passed 341 cases. Git history confirms PR #489/#488/#486 merge SHAs.
Impact: Detect merged cards reliably and archive only the three authorized trial cards; four unrelated eligible cards remain untouched.
Refs: Dev merge queue #518; Dev #489, #488, #486
Why: Finish Dev #488 with delivered Frontend and RDM objects, explicit audit grants in private browser fixtures, and owned process cleanup.
Evidence: Tool-imported SELF precheck, final sync, make test, and real-browser runs retain failures and passes; latest isolated runtime completed seven browser cases. Final exact-head GATE and independent parent Review follow.
Impact: Preserves other main components and existing CI jobs while the one final candidate is fixed for formal checks.
Refs: Dev PR #488; Frontend PR #73; RDM PR #301; queue Issue #518
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=f00165e8d71e4dc8ba0ceb7dc50c1a8a3deb6d60.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: A LOCAL_READY receipt must permit normal target advancement without accepting a rewind or divergent target history after its observation.
Evidence: Two disposable real Git regressions reproduced erroneous successful recovery before the guard; all 18 task recovery tests pass afterward. Raw SELF receipts are in the task card.
Impact: Reject abnormal target ancestry before receipt import; preserve normal local recovery and strict delivery defaults. Correct stale implementation-stage documentation without activating the queue.
Refs: Documents implementation plan ba4044d U2; independent review R1 and R2; .task/feature-merge-queue-policy-draft.md
Why: agents need consistent entrypoints and recording defaults to avoid retrying synchronization and CI outside the final delivery window.
Evidence: SELF generated-task-card red-green regression and governance suite recorded through make evidence; pending shared record created as Issue #518.
Impact: rules, task template and capability matrix stay explicit about pending activation, default strict startup, manual coordination and unchanged CI triggers.
Refs: U4; policy/merge-queue.md; .task/feature-merge-queue-policy-draft.md
Why: an existing authorized task should not merge a moving target merely to resume local work, while new task startup and delivery remain strict.
Evidence: SELF red-green recovery and environment regressions; task, recovery, evidence and local-mode write-guard suites passed through make evidence.
Impact: add explicit LOCAL_READY and task-resume, validate worktree/card/baseline and receipt purpose, preserve schema 1 and prevent local receipts from starting or releasing tasks.
Refs: U2; policy/merge-queue.md; .task/feature-merge-queue-policy-draft.md
Why: repeated task-sync calls changed HEAD and invalidated CI even when main had not advanced.
Evidence: SELF red-green regression and 58 task lifecycle tests recorded through make evidence in the task card.
Impact: sync still fetches and validates components, creates records only for an actual merge, and reports the complete final source SHA.
Refs: U1; policy/merge-queue.md; .task/feature-merge-queue-policy-draft.md
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=3fb8210f6495a78e70a67af3661bdfe9c00fb9de.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: A static dev deploy deleted the worktree before copying dist, so a mixed batch could not update the workbench. Missing manifests and a second instance on the same Postgres database must fail closed the same way on real artifacts.
Evidence: SELF unittest of the mixed batch, the three-entry manifest-loss case, and the PG cross-instance case exited 0. The PG case used a temporary cluster.
Impact: static dev deploys copy dist before recycling the worktree. Login and rdm.ping stay NOT_RUN.
Refs: tests/integration/lifecycle/test_lifecycle_real.py
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=5aebedebeb963b5c01f39fd9122ec60dbe6d34d3.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: U7 acceptance bootstrapped u7-admin into the shared dev runtime's
singleton rdm_admins ledger, locking the operator out of RDM admin pages
(rdm.role.list 400); recovery required forensics. KTD4 keeps base isAdmin
to audit-view only, so an operator-side trusted channel is needed.
Evidence: python3 -m unittest tests.test_svc_rdm_admin -v (25 OK, SELF);
live smoke on runtime/dev: show/status/typo-guard outputs verified.
Impact: new svc.sh <env> rdm-admin [show|transfer --to x] command, help
topic, status ledger line with stale-owner warning; no behavior change
for existing commands.
Refs: task card .task/feature-rdm-admin-lockout-recovery.md R1/R2
Why: The live deploy journal never called fault injection, and test-lifecycle failed closed on login so CI could not require the real combination cases.
Evidence: SELF python3 -m unittest tests.test_svc_u2.U2ReleaseTests -q exit 0 (35 ok, 1 skipped) on 3602a87; receipt sha256 9b5785577751e8e9e7947cf9700fb8854b1c80142f34273ae25f3097ee4c9aa8.
Impact: test-pg builds the Dev binary and runs make test-lifecycle. Login and full-track deploy without SVC_RDM_ORIGIN stay NOT_RUN. No live data move and no account CLI.
Refs: recovery plan D2/D3; Dev #485
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=cd61bbb112eea6a210a64e84f2cef00b0d64bfc1.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: Main D1 now shares the same explicit fixture initialization contract.
Evidence: Both real SQLite and temporary PostgreSQL initialization paths
were independently replayed; capabilities JSON assertions are preserved.
Impact: Resolve duplicate PG setup through the tested helper; preserve
all main lifecycle changes and the rollback directory protection.
Refs: Dev #483/#485; D1 existing-store identity contract
Why: one isolated run reached a listening server and still failed the single login attempt, while the same data accepted the password a moment later.
Evidence: replaying the login against that data directory returned HTTP 200.
Impact: the seed retries login for a few seconds before it stops. The password and the set-password step are unchanged.
Refs: scripts/e2e.sh
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: the audit seed does not provide the project-settings entry, so the U7 live-entry specs fail before the script reaches its plain-base phase.
Evidence: the isolated run passed all five rdm-audit specs, including the overview export, and failed four U7 specs on a missing 项目设置 tool.
Impact: this script's first browser phase is limited to e2e/rdm-audit.playwright.ts. The U7 specs stay in the frontend suite for their own seed.
Refs: scripts/e2e.sh
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: a freshly created account still has must_change_password set, so the seed command returns 403 before Playwright can open the audit workspace.
Evidence: a replay of the isolated seed received "forbidden: password setup required" on rdm.project.create.
Impact: the seed completes the existing set-password call and logs in again. Browser login still starts from the initial password.
Refs: scripts/e2e.sh
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: env -i dropped RDM_DISABLE_EXEC_TOOLS, so the real RDM binary exited immediately on runners without bwrap, and the capability probe now prints the JSON document.
Evidence: SELF bash -n scripts/svc.sh; python3 -m py_compile tests/test_svc_realcombo.py. GATE run 2656 job 3831 failed on the previous head before this fix.
Impact: serve and the lifecycle child forward that one switch; identity capabilities is checked as protocol 1 JSON.
Refs: #485
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: main gained the real-combination CI gate after the previous sync, and this branch still has to carry that gate with the isolated identity calls.
Evidence: SELF python3 -m unittest recovery/identity/u2/deploy/pin/isolation — 100 tests OK (2 skipped); bash -n scripts/svc.sh.
Impact: identity ensure/verify still pass DSN only through the environment; stop waits for the port and can keep the desired state. CI keeps the lifecycle pin step and the svc-realcombo job.
Refs: #485
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: env -i dropped SVC_STUB_*, so recovery tests saw an empty serve record even though the bound DSN was still passed.
Evidence: SELF python3 -m unittest tests.test_svc.SvcDbRecoveryTests tests.test_svc_lifecycle_isolation — 34 tests OK.
Impact: only SVC_STUB_* is added at launch; serve.env still omits them, and caller AGENT_SYSTEM_* stays out of the process.
Refs: #485
Co-authored-by: Cursor <cursoragent@cursor.com>