diff --git a/tasks/active/2026-10-28-full-installer.md b/tasks/archive/2026-10-28-full-installer.md similarity index 98% rename from tasks/active/2026-10-28-full-installer.md rename to tasks/archive/2026-10-28-full-installer.md index f7f8c169fc..7d8a8b262f 100644 --- a/tasks/active/2026-10-28-full-installer.md +++ b/tasks/archive/2026-10-28-full-installer.md @@ -296,3 +296,13 @@ Raphaël approved the paid cold build, then asked for iteration until it works. Peak disk 7.9 GB, 7.7 GB free at the end. Memory peak is unobserved: cgroup `memory.peak` is not readable inside the managed container. No OOM kill occurred on the 8 GiB instance. The elapsed-time compute estimate is about $0.11, about $0.14 across all four runs, before allowances; actual billing is not reconciled. Evidence: `tasks/evidence/2026-11-03-installer-cold-build/result.json` and `progress.jsonl`. This proves the fit-only cold build (artifacts, no tests). It does not prove a full install. Deployment, OAuth sign-in and revocation still need the OAuth client. PRs #2465/#2475 stay draft and unmerged. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2475 (merged 2026-11-08) shipped the user-owned installer; draft #2465 was closed as superseded by it. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- The ten top-level plan items (runner-neutral engine through CI/staging proof) are superseded by + this file's later implementation and publication checkpoints and shipped in #2475; their boxes + were never ticked as the work moved into those checkpoints. They were not individually + re-verified in this sweep. The shared-engine CI parity work (production still runs with `use_shared_engine` unset in `.github/workflows/deploy-reusable.yml`) and the adversarial-audit items are carried forward in `tasks/backlog/2026-11-09-installer-shared-engine-follow-ups.md`. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-10-28-installer-brand.md b/tasks/archive/2026-10-28-installer-brand.md similarity index 95% rename from tasks/active/2026-10-28-installer-brand.md rename to tasks/archive/2026-10-28-installer-brand.md index e1b6c42708..ef200f515c 100644 --- a/tasks/active/2026-10-28-installer-brand.md +++ b/tasks/archive/2026-10-28-installer-brand.md @@ -110,3 +110,9 @@ landing captures, including actual unavailable state, and gave final verdict: design blockers or visible regression. Screenshot artifact12833588308. Review and validation recorded in PR2465. Live Browser Back check retained both floor canvases. Design work complete; real OAuth and aggregate PR merge remain blocked as before. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: Brand work landed through #2475 (merged 2026-11-08), which contains all of #2465; #2465 itself was closed unmerged. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-10-28-installer-prototype.md b/tasks/archive/2026-10-28-installer-prototype.md similarity index 83% rename from tasks/active/2026-10-28-installer-prototype.md rename to tasks/archive/2026-10-28-installer-prototype.md index 0fa2f5ec2a..f5957880d5 100644 --- a/tasks/active/2026-10-28-installer-prototype.md +++ b/tasks/archive/2026-10-28-installer-prototype.md @@ -11,8 +11,8 @@ Research: design v4 SAM idea 01M60R60ZQT4203MGXAVJNPRH5. Cloudflare confidential - [x] Tests: callback replay/expiry, CSRF, account isolation, cleanup, upstream failures - [x] Mobile/desktop browser screenshots and overflow assertions - [x] Specialist code review, staging Worker deployment, public endpoint and mobile/desktop checks -- [ ] Configure OAuth client and verify real Cloudflare consent -- [ ] PR with validation and explicit prototype limitations +- [x] Configure OAuth client and verify real Cloudflare consent +- [x] PR with validation and explicit prototype limitations Acceptance: no marketing/main-app storage or session dependency; no cloud tokens in browser/logs/URLs; deployments do not run in forks; env-derived domain; user gets clear bounded prototype outcome; self-host instructions reproducible; staging address serves verified build. @@ -21,3 +21,9 @@ Workflow adjustment: reuse SAM-provided isolated branch/workspace and task file Validation: 12 tests, lint/typecheck/dry-run build, public-doc build/link checks and 12 browser screenshots pass; real local cross-site form/redirect/cookie handoff passes. Security and completion reviewers passed code. Staging run 40679197642 deployed the Worker but OAuth client configuration returned403; requested OAuth Client Read/Write on staging deployment token. Live API evidence identified wildcard `*.sammy.party/*` interception; deployment now adds exact installer hostname route. New bounded staging smoke provisions/checks/deletes a temporary Worker independently of OAuth consent. Staging run [40680257534](https://github.com/raphaeltm/simple-agent-manager/actions/runs/40680257534): temporary Worker provisioning, anonymous401, ownership handoff and cleanup passed; exact routing fixed. Live install.sammy.party serves build23852a97f; mobile/desktop screenshots reviewed, no overflow, login correctly disabled. Real endpoint checks: foreign-Origin403, unconfigured sign-in503, anonymous session401, privacy200. OAuth provisioning403 is the remaining blocker; no real consent success claimed. Production configured but not deployed. Branch5151bdeef adds public prerequisite correction. PR held until staging OAuth verification per /do phase6 gate. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: Prototype superseded by the shipped installer in #2475 (merged 2026-11-08), which registers the OAuth client in full mode (`OAUTH_REGISTRATION_TOKEN`) and verified real consent in fresh installs. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-02-node-escape-unpinning-wait-reasons.md b/tasks/archive/2026-11-02-node-escape-unpinning-wait-reasons.md similarity index 94% rename from tasks/active/2026-11-02-node-escape-unpinning-wait-reasons.md rename to tasks/archive/2026-11-02-node-escape-unpinning-wait-reasons.md index 79db2343d2..d6cb6ef19f 100644 --- a/tasks/active/2026-11-02-node-escape-unpinning-wait-reasons.md +++ b/tasks/archive/2026-11-02-node-escape-unpinning-wait-reasons.md @@ -33,7 +33,7 @@ subagent confirms address the core problems. - [x] Vertical-slice tests per item, each proven discriminating - [x] Local test-quality reviewer subagent confirms tests are legitimate (all three LEGITIMATE) - [x] Security and UI/UX reviews addressed; docs updated -- [ ] PR green, merge, prod deploy verified +- [x] PR green, merge, prod deploy verified ## Findings @@ -102,3 +102,10 @@ subagent confirms address the core problems. visible (`useFallbackSessionPoll.ts`), which bounds staleness to one poll; pushing would need `updateD1ExecutionStep` to broadcast on an unchanged step. Raised as MEDIUM by the task-completion validator and accepted as bounded. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2494 merged 2026-11-03. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- Fix A and Fix B stay deferred as recorded above; their backlog files remain open. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-03-operations-tools-pr2-eyes.md b/tasks/archive/2026-11-03-operations-tools-pr2-eyes.md similarity index 96% rename from tasks/active/2026-11-03-operations-tools-pr2-eyes.md rename to tasks/archive/2026-11-03-operations-tools-pr2-eyes.md index 5774ce6d79..1701171a81 100644 --- a/tasks/active/2026-11-03-operations-tools-pr2-eyes.md +++ b/tasks/archive/2026-11-03-operations-tools-pr2-eyes.md @@ -73,3 +73,10 @@ Fresh Phase 5 review of 8 local reviewers on d826b6cbe. Fixed: - Next: wait for PR1 #2501 `merged` → `git rebase origin/main` → push `HEAD:sam/operations-tools-pr2-3-4vtq8v` → Phase 6 staging (check no other staging run is active). - Staging plan: staging CF_TOKEN cannot write KV, so drive real chats. Secrets only through exec_with_secrets (CF_TOKEN; read-only D1 helper: account c4e4aebd980b626f6af43ac6b1edcede, main D1 1cfaf5d4-8226-47d8-bf26-6ba727ce5718, observability D1 8c2fa46c-3b89-428b-b235-d835b7914106). Smoke user is superadmin. In the admin UI set the Operations (feedback) project to Test Project 1 (01KJNR9R3TEN3KX1ETE33852R8) and `operations.debuggerTools=read`; restore both afterwards. Start a chat in Test Project 1 with VM profile raph-cc-convo (01KVR2BJEFY19587NTWR5M6PQN) so it owns a real node, and have it call ops_find_anomalies, ops_get_session_story (its own task), ops_node_logs with contains, ops_capture_debug_package and download_library_file. Check operations_audit_log rows. Delete the VM afterwards. - PR body: per-tool round-trip table (gate 1 D1 + audit 1 D1 + settings cached; anomalies ~10, list_nodes ~3, get_node ~7, session_story ~14, timeline ~15 with fan-out 2, search_errors ~3, worker_logs ~3, node_* ~4, workspace_agent_sessions ~5, capture ~9 + R2; purge ~6 per run), debug-package buffering rationale (library encrypts whole objects; capped streaming read), CodeRabbit evidence. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2504 merged 2026-11-04 (PR1 #2501 and PR3 #2502 also merged). +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- The two unchecked items were not re-verified in this sweep. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-03-operations-tools-pr3-actions-telemetry.md b/tasks/archive/2026-11-03-operations-tools-pr3-actions-telemetry.md similarity index 97% rename from tasks/active/2026-11-03-operations-tools-pr3-actions-telemetry.md rename to tasks/archive/2026-11-03-operations-tools-pr3-actions-telemetry.md index 6f33f311c0..784efecec5 100644 --- a/tasks/active/2026-11-03-operations-tools-pr3-actions-telemetry.md +++ b/tasks/archive/2026-11-03-operations-tools-pr3-actions-telemetry.md @@ -102,3 +102,9 @@ Debugging agents in the Operations project cannot answer "why is this node still - decide `status = 'pending'` → re-open an executed approval (first attempt was non-discriminating: a deny also moves `expires_at`, so the expiry conjunct masked it; the re-open test fixes that) - decide `expires_at > ?` → approve an expired request - Bug found by the telemetry-source test: the capture source selected `trigger` (column is `capture_trigger`). + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2502 merged 2026-11-04. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-03-sam-glass-chat-and-nav.md b/tasks/archive/2026-11-03-sam-glass-chat-and-nav.md similarity index 89% rename from tasks/active/2026-11-03-sam-glass-chat-and-nav.md rename to tasks/archive/2026-11-03-sam-glass-chat-and-nav.md index 235ffd024b..ecfe9af50e 100644 --- a/tasks/active/2026-11-03-sam-glass-chat-and-nav.md +++ b/tasks/archive/2026-11-03-sam-glass-chat-and-nav.md @@ -50,7 +50,7 @@ surface in light and dark, desktop and mobile, uploaded to the PR. - [ ] Chat desktop and mobile resemble references 01/02/03/04/10 in both themes - [ ] At most one live blur on screen; panes separated by gutters; elements solid - [ ] All chat-attached panels and dialogs use the SAM Glass overlay -- [ ] CI green on the draft PR; screenshots posted to the PR +- [x] CI green on the draft PR; screenshots posted to the PR ## Implementation notes @@ -61,3 +61,10 @@ surface in light and dark, desktop and mobile, uploaded to the PR. - Overlays use the full pane fill + live blur; light-mode chrome fill was too see-through. - Hierarchy modal closes the phone chat-list drawer first (two live blurs otherwise). - Docs screenshots under apps/www/public/images/docs predate SAM Glass; regenerating them is a separate pass. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2506 merged 2026-11-04 (originally requested as a draft; later merged), with follow-ups #2522 and #2529. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- The unchecked visual acceptance items were not re-verified in this sweep. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-04-warm-node-proof-after-wake.md b/tasks/archive/2026-11-04-warm-node-proof-after-wake.md similarity index 95% rename from tasks/active/2026-11-04-warm-node-proof-after-wake.md rename to tasks/archive/2026-11-04-warm-node-proof-after-wake.md index 3fd4fe2a5d..a95af4de5e 100644 --- a/tasks/active/2026-11-04-warm-node-proof-after-wake.md +++ b/tasks/archive/2026-11-04-warm-node-proof-after-wake.md @@ -82,3 +82,9 @@ Constraint: do not relax the proof requirement (rule 56). - [x] A slept workspace whose wake released its binding gets deletion proof on its first due attempt. - [x] Its stopped node is destroyed on the first cleanup pass. - [x] No unbound workspace without a held wake claim is treated as preserved, including one with only a stale wake task. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2526 merged 2026-11-04. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-05-gcp-setup-docs-and-pool-deduplication.md b/tasks/archive/2026-11-05-gcp-setup-docs-and-pool-deduplication.md similarity index 92% rename from tasks/active/2026-11-05-gcp-setup-docs-and-pool-deduplication.md rename to tasks/archive/2026-11-05-gcp-setup-docs-and-pool-deduplication.md index ac4bffc6d5..a76ea2eed7 100644 --- a/tasks/active/2026-11-05-gcp-setup-docs-and-pool-deduplication.md +++ b/tasks/archive/2026-11-05-gcp-setup-docs-and-pool-deduplication.md @@ -15,7 +15,7 @@ Publish today's GCP learnings in public docs ASAP, then deploy a fix for one con - [x] Add meaningful regressions for connection-to-catalog/pool flow and distinct accounts. - [x] Run API validation and independent Cloudflare/security/test/constitution/task reviews. - [x] Verify deployed staging behavior before fix PR. -- [ ] Merge and monitor production rollout with bounded smoke. +- [x] Merge and monitor production rollout with bounded smoke. - [x] Update known-issue docs when fix ships. ## Acceptance @@ -43,3 +43,9 @@ Random-ID managed dual writes introduced by b00b2952d (#1612) were missed by a c PR #2540 CI passed at head 0ebe85960. CodeRabbit was requested once after green CI and returned five findings after an active review. Shared seed/mirror snapshot and non-null legacy identity fixes have regression coverage. The repair now compares an ordered candidate snapshot before acquiring a unique source-generation lease; authority updates use bounded chunks in one atomic batch. Matched retained candidates refresh catalog state independently of source-wide retirement, while unmatched overrides remain unchanged. Canonical-only selections now have explicit union coverage. Revised checks and follow-up staging verification are required before merge; the earlier staging result applies to the original runtime only. Follow-up local validation: 28 focused GCP regressions and all 138 default-capacity-pools tests pass, including 2,000 historical rows with a two-row update chunk budget, candidate insertion/update races, source publication ownership, retained catalog freshness/idempotence, and preserved canonical-only selections. Independent correctness review passes. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: Docs #2538 and dedupe fix #2540 merged 2026-11-05. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-05-google-antigravity-agent.md b/tasks/archive/2026-11-05-google-antigravity-agent.md similarity index 96% rename from tasks/active/2026-11-05-google-antigravity-agent.md rename to tasks/archive/2026-11-05-google-antigravity-agent.md index 6504eac60f..93e06d284a 100644 --- a/tasks/active/2026-11-05-google-antigravity-agent.md +++ b/tasks/archive/2026-11-05-google-antigravity-agent.md @@ -144,3 +144,9 @@ Declined, with replies on the PR: `PLATFORM_AI_MODELS` entries (Antigravity has the invariant covers platform-routed agents only), Playwright submit test (generic connect flow), Plan mode mapping (Antigravity has no read-only mode; `default` asks before every write and the guide says so), XDG/plugin-secret/helper-regeneration notes. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2542 merged 2026-11-06. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-05-live-steering-claude-codex-opencode.md b/tasks/archive/2026-11-05-live-steering-claude-codex-opencode.md similarity index 97% rename from tasks/active/2026-11-05-live-steering-claude-codex-opencode.md rename to tasks/archive/2026-11-05-live-steering-claude-codex-opencode.md index bec499bb0d..af198cd77f 100644 --- a/tasks/active/2026-11-05-live-steering-claude-codex-opencode.md +++ b/tasks/archive/2026-11-05-live-steering-claude-codex-opencode.md @@ -213,3 +213,9 @@ default without clicking it. Staging's GitHub Environment now has `ACP_INTERACTI - OpenCode release: https://github.com/raphaeltm/simple-agent-manager/releases/tag/opencode-v2.2.5-sam-s1 (two builds in one environment are byte-identical; CI vs workspace builds differ, so the CI build is the published artifact). + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2536 merged 2026-11-05; follow-ups #2543, #2546 and #2556 also merged. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-06-mcp-tool-domain-grouping.md b/tasks/archive/2026-11-06-mcp-tool-domain-grouping.md similarity index 93% rename from tasks/active/2026-11-06-mcp-tool-domain-grouping.md rename to tasks/archive/2026-11-06-mcp-tool-domain-grouping.md index 2b13df57ad..e74b85af6e 100644 --- a/tasks/active/2026-11-06-mcp-tool-domain-grouping.md +++ b/tasks/archive/2026-11-06-mcp-tool-domain-grouping.md @@ -67,3 +67,10 @@ Kept standalone on purpose: library `upload_to_library`/`replace_library_file`/` - The local machine is shared and was at load average 30-67. Some suites hit their 10s hook timeouts, and a stashed `main` failed the same way. - Follow-ups: idea 01M6SPM7G7TPCNAMC31EVZ1QDP (coordination tools phase 2), idea 01M6SPMDHY2F2BPVD933B9FYJZ (policy injection budget). - Merge with main 349c78101 -> head 1fead2384; baseline kept 2180@a42bb51 with main dates; CI 21/21 incl Sonar. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2558 merged 2026-11-07 (145 to 82 tools); the original do-not-merge constraint was lifted. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- The unchecked acceptance items were not individually re-verified in this sweep; the grouped `_read`/`_write` tools are in use in production SAM sessions. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-07-pool-provider-fallback.md b/tasks/archive/2026-11-07-pool-provider-fallback.md similarity index 96% rename from tasks/active/2026-11-07-pool-provider-fallback.md rename to tasks/archive/2026-11-07-pool-provider-fallback.md index 8f04c36337..4b34001eb5 100644 --- a/tasks/active/2026-11-07-pool-provider-fallback.md +++ b/tasks/archive/2026-11-07-pool-provider-fallback.md @@ -124,3 +124,9 @@ Waived by Raphaël for this work (session `eecddba8`, 2026-11-07). `services/provisioning-attempt-limits.ts`. LOWs done: quota target lookup fails closed; stale-lease restart test with a skipped first tier. Compaction: per-source test traced into `buildProvisioningExhaustionPlan` (two tiers survive); both proven by revert. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2576 merged 2026-11-07 (stacked on #2571 and #2572, both merged). +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/active/2026-11-08-bootstrap-cpu-placement.md b/tasks/archive/2026-11-08-bootstrap-cpu-placement.md similarity index 85% rename from tasks/active/2026-11-08-bootstrap-cpu-placement.md rename to tasks/archive/2026-11-08-bootstrap-cpu-placement.md index c2f595598d..923444944c 100644 --- a/tasks/active/2026-11-08-bootstrap-cpu-placement.md +++ b/tasks/archive/2026-11-08-bootstrap-cpu-placement.md @@ -20,9 +20,16 @@ Idea 01M6YQ6KWZ24HA20CKPB59SYRG: a newly provisioned staging node refused its ow - [ ] Staging small reservation .2 vCPU/.5GB RAM/5GB disk; delete every created staging VM. - [ ] Early DRAFT PR + needs-human-review. CodeRabbit request/wait recorded. - [ ] Exact PR/head SHA approval from coordinator before ready/merge; new commit voids approval. -- [ ] Production deployment success with deployed main containing merge before bug 2 begins. +- [x] Production deployment success with deployed main containing merge before bug 2 begins. ## Workflow No main commits. Use existing SAM task branch/workspace. Archive notes belong in a separate draft PR, per user; keep this task active until then. Red/green proof: four failures pre-fix (reserve, attach, first-reservation evaluator, correct disk reason during bootstrap); 111 tests passed after fix. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Shipped: #2595 merged 2026-11-09. +- Production deploy run on `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains this merge, so the change is live. +- Process items (staging slot, coordinator approval) were not re-verified in this sweep. +- Moved from `tasks/active/` to `tasks/archive/` by the weekly reconciliation. diff --git a/tasks/archive/2026-11-09-weekly-queue-reconciliation.md b/tasks/archive/2026-11-09-weekly-queue-reconciliation.md new file mode 100644 index 0000000000..4bfb4c9b2f --- /dev/null +++ b/tasks/archive/2026-11-09-weekly-queue-reconciliation.md @@ -0,0 +1,50 @@ +# Weekly queue reconciliation (2026-11-09) + +SAM task `cron-95d1a1792d3440f08f38dbc6dc0d3af59ef0e12b71de7f18963d7aff02c18bda`. Output branch +`sam/weekly-queue-memory-reconciliation-c18bda`. Task-file-only change: no code, so staging +verification does not apply. + +## Problem + +The repository task queue drifts from reality: files stay in `tasks/active/` after their PRs +merge, and `tasks/backlog/` accumulates shipped, superseded and duplicate entries. Old open PRs +need a weekly status nudge so their park decisions stay visible. + +## Research findings + +- `tasks/active/` had 14 files (not ~75). Every one maps to a merged PR (#2475, #2494, #2502, + #2504, #2506, #2526, #2536, #2538/#2540, #2542, #2558, #2576, #2595). Production deploy on + `e727f0259` (2026-11-09 01:29 UTC) succeeded and contains all of them. +- The archived full-installer task still lists open work (shared-engine CI parity, adversarial + audit gaps, release dependencies). Carried to + `tasks/backlog/2026-11-09-installer-shared-engine-follow-ups.md` so it is not lost. +- `tasks/backlog/` had 272 files, classified per file by evidence (merged PR or code path). +- Open PRs older than 7 days: #2376, #2308, #2265, #2062, #1788. The PR Shepherd defers weekly + consolidated reminders on them to this sweep. + +## Checklist + +- [x] Archive the 14 shipped active tasks with a reconciliation note each; tick checkboxes that + only recorded the merge or deploy +- [x] Carry the installer task's open remainder to a backlog file +- [x] Post a weekly status/park comment on each PR older than 7 days +- [x] Classify every backlog file; delete only shipped, superseded, obsolete or duplicate entries + with evidence; keep anything plausibly open (272 classified: 13 removed, 120 PARTIAL, + 139 KEEP; duplicates' unique criteria folded into their canonical files) +- [x] Add reconciliation notes to the 13 PARTIAL files with new progress since the last sweep +- [x] Record a one-line rationale per removed backlog file in the PR description + +## Acceptance criteria + +- [x] `tasks/active/` contains only this task while the PR is open (archived before merge) +- [x] Every removed backlog file has a one-line rationale in the PR description +- [x] No backlog file with plausibly open work is removed (each removal spot-checked against code) +- [ ] CI green + +## Notes + +- Removed files and rationale: see the PR description. +- Findings left for humans (not changed here): `rateLimitAnonymous` + (`apps/api/src/middleware/rate-limit.ts`) has no callers since #2588; the `origin/harness/develop` + branch (PRs #943–#953) needs a land-or-retire decision; main CI on `80bb3b6de` (#2598) failed in + `Devcontainer Volume Mount`, so that merge has not deployed yet. diff --git a/tasks/backlog/2026-03-14-fork-dialog-ui-polish.md b/tasks/backlog/2026-03-14-fork-dialog-ui-polish.md deleted file mode 100644 index 67a0c9e5aa..0000000000 --- a/tasks/backlog/2026-03-14-fork-dialog-ui-polish.md +++ /dev/null @@ -1,45 +0,0 @@ -# Fork Dialog UI Polish - -> **Reconciliation 2026-10-26:** Still no close button. #2399 (`cc2d968df`) moved the session -> filters into `useSessionFilters`, so the pointers moved: drawer header -> `MobileSessionDrawer.tsx:95-122`, backdrop `:76-81`, Escape handler `:62-68`. - -> **Reconciliation 2026-09-30 (weekly queue audit): partially shipped; still open.** -> -> - **Shipped:** none of the five items as written; four targeted UI that no longer exists (below). -> - **Still open:** a visible close button in the `MobileSessionDrawer` header -> (`apps/web/src/pages/project-chat/MobileSessionDrawer.tsx:114-146`). The drawer still closes -> only by backdrop tap (`:100-104`) or Escape (`:86-92`). -> - **Moot/dropped:** -> - Continue-button touch target and disabled-Continue tooltip: the button was removed from -> session items in PR #1477 (`c8946c46e`); fork now lives in the session header. -> - Summary `method` tooltip and the 375px ForkDialog check: `ForkDialog` was deleted in PR #991 -> (`6e4c33e21`), and `DerivedSessionBanner.tsx` does not show the method. -> - The 56px touch-target minimum also conflicts with `apps/web` rule 17, which no longer asks -> for enlarged touch targets. - -**Created**: 2026-03-14 -**Source**: UI/UX review of PR #376 (conversation forking) - -## Problem - -The ForkDialog and Continue button shipped with functional UI but several polish items remain from the UI/UX review: - -1. **Touch target size**: The "Continue" button in `SessionItem` uses `text-xs` with minimal padding, producing a tap area below the 56px minimum for mobile -2. **Mobile drawer close button**: `MobileSessionDrawer` relies on backdrop tap or Escape — no visible close button inside the panel for assistive technology users -3. **Non-forkable session affordance**: Sessions that can't be forked (active, no task) show no indication of why "Continue" is absent — a disabled state with tooltip would improve discoverability -4. **Summary method tooltip**: The `method` field (ai/heuristic/verbatim) shown in the summary metadata is opaque to non-technical users - -## Acceptance Criteria - -- [ ] Continue button meets 56px minimum touch target (add `py-2 px-1.5` or use shared `Button` with `size="sm"`) -- [ ] MobileSessionDrawer has an accessible close button in the header -- [ ] Non-forkable terminated sessions show a disabled "Continue" with tooltip explaining why -- [ ] Summary method has a `title` attribute explaining what each method means -- [ ] Verify on 375px viewport that ForkDialog is fully usable without background scroll-through - -## Context - -- `apps/web/src/components/project/ForkDialog.tsx` -- `apps/web/src/pages/ProjectChat.tsx` (SessionItem, MobileSessionDrawer) -- Review report: UI/UX agent review of PR #376 diff --git a/tasks/backlog/2026-03-18-gcp-self-hosting-docs.md b/tasks/backlog/2026-03-18-gcp-self-hosting-docs.md deleted file mode 100644 index af7fd41fb0..0000000000 --- a/tasks/backlog/2026-03-18-gcp-self-hosting-docs.md +++ /dev/null @@ -1,38 +0,0 @@ -# Document GCP Prerequisites for Self-Hosting - -> **Reconciliation 2026-10-26:** Nothing shipped. The "GCP provisioning credentials" section is now -> `apps/www/src/content/docs/docs/guides/self-hosting.mdx:175-188` and still lists none of the five -> APIs. - -> **Reconciliation 2026-10-12:** Nothing shipped. Path fix: the guide is -> `apps/www/src/content/docs/docs/guides/self-hosting.mdx`; `docs/guides/self-hosting.md` does not -> exist. Its "GCP provisioning credentials" section (`:170-183`) already covers the infrastructure -> OAuth client's redirect URIs and scope, but not the five APIs below. Still open: every criterion. - -## Problem - -The GCP OIDC integration requires several APIs to be enabled on the GCP project where the OAuth client is created (the SAM operator's project). All API calls made via the user's OAuth token are billed/rate-limited against the OAuth client's project, so that project needs every API enabled that the setup flow calls. Without them, the setup fails with 403 "API has not been used in project" errors. - -## Context - -Discovered during staging testing of PR #452 (GCP OIDC integration). This is distinct from the APIs enabled on the user's target project during automated setup. - -## Required APIs on the OAuth Client Project - -These must be enabled as a one-time self-hosting prerequisite: - -1. `cloudresourcemanager.googleapis.com` — list/get projects, IAM policy operations -2. `iam.googleapis.com` — WIF pools, OIDC providers, service accounts -3. `serviceusage.googleapis.com` — enable APIs on user's target project -4. `sts.googleapis.com` — STS token exchange during OIDC verification -5. `iamcredentials.googleapis.com` — credential generation during verification - -Link format: `https://console.developers.google.com/apis/api//overview?project=` - -## Acceptance Criteria - -- [ ] Add GCP OAuth client setup instructions to `docs/guides/self-hosting.md` -- [ ] Document all 5 required APIs on the OAuth client project (listed above) -- [ ] Include direct link format for each API -- [ ] Mention this is a one-time setup step alongside GitHub App and Cloudflare configuration -- [ ] Add to any setup checklist or quick-start guide diff --git a/tasks/backlog/2026-04-19-trial-late-audit-hardening.md b/tasks/backlog/2026-04-19-trial-late-audit-hardening.md deleted file mode 100644 index b2c542b49c..0000000000 --- a/tasks/backlog/2026-04-19-trial-late-audit-hardening.md +++ /dev/null @@ -1,218 +0,0 @@ -# Trial Onboarding — Late-Audit Hardening Follow-ups - -> **Reconciliation 2026-10-26:** nothing in scope shipped; two pointers moved. HIGH-4's only -> `bridgeAcpSessionTransition` caller is now `durable-objects/project-data/index.ts:2651-2655` -> and still passes no `workspaceUrl`. LOW-CF-2's v9 migration is now -> `apps/api/wrangler.toml:427-428`. - -> **Reconciliation 2026-10-12:** nothing in scope shipped; four pointers moved. HIGH-4's only -> `bridgeAcpSessionTransition` caller is now `durable-objects/project-data/index.ts:2194-2198` and -> still passes no `workspaceUrl`. LOW-SEC-3's `rateLimitAnonymous` is now -> `middleware/rate-limit.ts:393`, still unused. LOW-SEC-1's `clearClaimCookie` call is now -> `routes/trial/claim.ts:201` (#2293 added an owner-membership transfer to the claim above it). -> #2303 (`d23d66498`) cut `apps/api/wrangler.toml` to 568 lines, so LOW-CF-2's v9 migration is now -> at `:424-425`. - -> **Reconciliation 2026-09-30 (weekly queue audit): partially shipped; still open.** -> -> - **Shipped:** source paths are under `apps/api/src/`. -> - MEDIUM-SEC-1: per-IP rate limit on the SSE route (`routes/trial/events.ts:51-73`). -> - MEDIUM-CF-2: `eventsUrl` matches the real route (`routes/trial/create.ts:393`, asserted in -> `apps/api/tests/unit/routes/trial-create.ts.test.ts:367`). -> - LOW-SEC-1: `clearClaimCookie` now gets the cookie domain (`routes/trial/claim.ts:178-180`). -> - LOW-SEC-2: a structured error is logged when the secret is missing -> (`routes/trial/create.ts:195-203`), and deploys now generate the secret. No one-shot dedupe. -> - MEDIUM-1, mostly: `getStatus()` redacts the MCP token and explains why -> (`durable-objects/trial-orchestrator/index.ts:140-152`); admin trial routes are -> superadmin-only (`routes/admin-trials.ts:30`). -> - **Still open:** -> - HIGH-3: the claim cookie is still `SameSite=Lax` (`services/trial/cookies.ts:193`). Verify -> Strict or document why Lax is needed. -> - HIGH-4: KV-derived `workspaceUrl` fallback (`services/trial/bridge.ts:43-45`). The only -> caller (`durable-objects/project-data/index.ts:2083`) does not pass `workspaceUrl`. -> - MEDIUM-2: no check that the sentinel installation is not a real one -> (`durable-objects/trial-orchestrator/helpers.ts:46-48`), and no doc. -> - HIGH-CF-1: state is still written before the alarm is set -> (`durable-objects/trial-orchestrator/index.ts:115-117,316-317`); no regression test. -> - LOW-CF-1: `trial.started` is still emitted after `setAlarm` (same file, `:117-129`). -> - LOW-CF-3: `TrialEventBus` still has no multi-viewer note. -> - MEDIUM-SEC-2: README body is not byte-capped (`services/trial/github-knowledge.ts:63-82`). -> - LOW-SEC-3: no rate limit on `routes/trial/status.ts:27` or `routes/trial/waitlist.ts:30`; -> `rateLimitAnonymous` (`middleware/rate-limit.ts:390`) exists but nothing uses it. -> - LOW-1: the `workspaceUrl` disclosure is not documented (there is no trial architecture doc). -> - LOW-2: `timingSafeEqual` still returns early on a length mismatch -> (`services/trial/cookies.ts:80-81`). -> - **Moot/dropped:** -> - MEDIUM-CF-1: duplicate of `2026-04-19-trial-sse-abort-propagation.md`, which owns it. -> - LOW-CF-2: the v9 migration now uses `new_sqlite_classes` (`apps/api/wrangler.toml:607-609`). - -## Problem - -After PR #760 merged, a late-arriving security audit returned with findings. Two were stale (already fixed in the merged branch). The rest are non-exploitable hardening items worth addressing before `sam/trial-onboarding-mvp` merges to `main`. - -## Context - -- Late audit task-id: `a35608e033ac4405a` (returned 2026-04-19, after PR #760 merged) -- The audit ran against a pre-remediation commit; CRITICAL-1 (no rate limit) and HIGH-1 (fingerprint HMAC verify) had already been fixed in `a696fb82` and `c9d46d02` respectively. -- None of the remaining findings are actively exploitable in the current state. - -## Findings to Address - -### HIGH-3 — `SameSite=Lax` on claim cookie - -`apps/api/src/services/trial/cookies.ts:196` sets `SameSite=Lax` for both fingerprint and claim cookies. The claim cookie is functionally a bearer credential ("I own this trial project"). The auditor recommends `SameSite=Strict`. - -**Acceptance criteria**: -- [ ] Verify the OAuth claim flow works end-to-end with `SameSite=Strict` on the claim cookie (github.com OAuth callback → api.sammy.party → app.sammy.party/try/:id?claim=1 → `POST /api/trial/:id/claim`) -- [ ] Keep fingerprint cookie at `Lax` (needs to survive cross-site OAuth initiation) -- [ ] Staging test with the actual OAuth flow — unit tests cannot validate browser cookie semantics -- [ ] If Strict breaks the flow, document the specific navigation that requires Lax and keep it - -### HIGH-4 — `trial.ready` `workspaceUrl` derived from KV-backed record - -`apps/api/src/services/trial/bridge.ts:41-43` falls back to `record.workspaceId` from KV when `opts.workspaceUrl` is absent. If the KV mirror write lagged or failed, `workspaceUrl` emits as empty string. - -**Note**: The auditor's cross-trial wiring concern is invalid — `readTrialByProject` is keyed by unique `projectId`, not fingerprint. The real impact is a potentially-empty `workspaceUrl` field, which is a reliability/UX issue, not security. - -**Acceptance criteria**: -- [ ] Change the ACP bridge call sites to always pass `workspaceUrl` explicitly (the caller has the workspace record in scope) -- [ ] Remove the KV-derived fallback or log a warning when it fires - -### MEDIUM-2 — Sentinel installation trust assertion - -`apps/api/src/durable-objects/trial-orchestrator/helpers.ts:31-36` inserts trial projects under `resolveAnonymousInstallationId(env)` — the sentinel row. If this row is ever mapped to a real GitHub App installation (misconfiguration), trial projects inherit that installation's permissions. - -**Acceptance criteria**: -- [ ] Add a startup/migration-time assertion that the sentinel row has null/sentinel credentials (no real `access_token`) -- [ ] Document in `docs/architecture/trial-orchestrator.md` that the sentinel row must never map to a real installation -- [ ] Consider env var `TRIAL_INSTALLATION_IS_SENTINEL=true` as a startup check - -### MEDIUM-1 — `TrialOrchestrator.getStatus()` RPC access control (hypothetical) - -`getStatus()` is not currently exposed over HTTP. The auditor flagged this as future risk if an admin route is ever added. - -**Acceptance criteria**: -- [ ] Add a code comment on `getStatus()` in `trial-orchestrator/index.ts` warning against unauthenticated HTTP exposure -- [ ] If admin status endpoint is needed in future, must be gated by `requireAdmin()` - -### LOW items (defer to backlog-of-backlog or close as won't-fix) - -- LOW-1 — `trial.ready` `workspaceUrl` disclosure to SSE subscriber: inherent to design (anonymous trial before claim). Document in architecture. -- LOW-2 — `timingSafeEqual` length oracle: migrate to `crypto.subtle.verify()` in general cookies refactor (not trial-specific). -- LOW-3 — GitHub API unauthenticated 60 req/hour: already documented; may use GitHub App token when operator sets one. - -## Out of Scope - -- CRITICAL-1, HIGH-1 (stale; already fixed in PR #760) -- HIGH-2 (KV rate-limiter atomicity): already deferred with documented rationale; superseded by general migration away from KV rate limiting - -## Additional Findings — Cloudflare Configuration Audit (task `ae38c1e0689c9261e`, 2026-04-19) - -A second late-arriving review (Cloudflare-focused) returned after PR #760 merged. None are actively user-impacting (staging verification observed 12 SSE events + 3-stage progression), but they are worth addressing before `sam/trial-onboarding-mvp` merges to `main`. - -### HIGH-CF-1 — `advanceToStep` sequencing: `put('state')` → `setAlarm(now)` without atomic pairing - -`apps/api/src/durable-objects/trial-orchestrator/index.ts:270-271`. If the DO evicts/crashes between `put` and `setAlarm`, state advances but no alarm is scheduled — trial hangs until an external nudge. Since `alarm()` re-reads state at the top of each handler, the safe mitigation is to swap the ordering so a crash re-runs the previous step rather than parking the machine silently. - -**Acceptance criteria**: -- [ ] Swap to `setAlarm(now)` BEFORE `storage.put('state', ...)` at every call site where the two are paired -- [ ] Add a regression test that asserts alarm scheduling survives simulated put failures - -### MEDIUM-CF-1 — SSE `ReadableStream.cancel()` leaks in-flight long-poll on client disconnect - -`apps/api/src/routes/trial/events.ts:143-145`. `cancel()` is a no-op comment; the `heartbeat` `setInterval` and in-flight `busStub.fetch()` keep running until the poll times out (up to 15s). Bounded leak, no correctness issue, but each disconnect wastes a DO request slot. - -**Acceptance criteria**: -- [ ] Set `closed = true` inside `cancel()` and clear the heartbeat interval -- [ ] Use `AbortController` to abort the in-flight DO fetch on cancel - -### MEDIUM-CF-2 — `eventsUrl` response field is malformed (latent — frontend bypasses it) - -`apps/api/src/routes/trial/create.ts:394` returns `eventsUrl: /api/trial/events?trialId=...` but the actual route is `GET /:trialId/events`. **Staging works** because the frontend (`apps/web/src/lib/trial-api.ts:154`) ignores `eventsUrl` and constructs `${API_URL}/api/trial/${trialId}/events` directly. But any future consumer that honors the advertised `eventsUrl` will hit 404. - -**Acceptance criteria**: -- [ ] Either: update `eventsUrl` in `create.ts` to `https://api.${env.BASE_DOMAIN}/api/trial/${trialId}/events` (absolute, matches route) -- [ ] Or: remove `eventsUrl` from the response shape entirely if the frontend is the only consumer -- [ ] Add a test asserting the returned `eventsUrl` resolves to a live route - -### LOW-CF-1 — `trial.started` event emitted AFTER `setAlarm(now)` can race with subsequent step events on eviction - -`apps/api/src/durable-objects/trial-orchestrator/index.ts:107-119`. If the DO is evicted after `setAlarm` but before `safeEmitTrialEvent(trial.started)` completes, the started event is lost and the UI never shows the "warming up" → "started" transition. Not a data loss; step events still flow. - -**Acceptance criteria**: -- [ ] Emit `trial.started` BEFORE `setAlarm(now)` in `start()`, or move emission to the first alarm handler where persistence is guaranteed - -### LOW-CF-2 — `TrialOrchestrator` wrangler migration uses `new_classes` (not `new_sqlite_classes`) - -Currently correct — the DO only uses `ctx.storage.put/get`, not `ctx.storage.sql`. Flagged as a maintenance trap because a future contributor adding `ctx.storage.sql` would silently get an uninitialized SQLite without bumping the migration. - -**Acceptance criteria**: -- [ ] Add a comment to the `v9` migration block in `wrangler.toml` explicitly stating: "intentional: TrialOrchestrator is KV-only. If adding `ctx.storage.sql`, switch to `new_sqlite_classes` AND bump the migration version." - -### LOW-CF-3 — `TrialEventBus` is designed for single-viewer - -`apps/api/src/durable-objects/trial-event-bus.ts`. Waiters are independent (per-poll timers + resolve pairs), so multi-viewer works correctly, but it's not documented. Add a comment. - -**Acceptance criteria**: -- [ ] Add a class-level doc comment noting the single-consumer design intent and confirming multi-consumer works because waiters are independent - -## Out of Scope (Cloudflare Audit) - -- MEDIUM-CF-3 (KV rate-limit race on `POST /api/trial/create`): already listed as HIGH-2 deferred above; same disposition — acknowledged tradeoff, atomic `TrialCounter` DO still protects the monthly cap from overshoot. - -## Additional Findings — Second Security Audit (task `a1dafc59ceab016f4`, 2026-04-19) - -A third late-arriving review (security-focused re-audit) returned. Multiple findings duplicate earlier audits or are stale (ran against a pre-fix commit). New items worth tracking: - -### MEDIUM-SEC-1 — No rate limit on `GET /api/trial/:trialId/events` - -SSE endpoint holds Worker subrequests open up to 30 min each. A single IP could open many concurrent connections against different (possibly-guessed) trialIds. Per-IP limit recommended. - -**Acceptance criteria**: -- [ ] Apply `rateLimitAnonymous` or a dedicated `rateLimitTrialEvents` factory to the events route -- [ ] Staging test: confirm normal SSE flow not affected by the limit - -### MEDIUM-SEC-2 — README response body not byte-capped in `fetchText()` - -`apps/api/src/services/trial/github-knowledge.ts:177-192`. `resp.text()` buffers entire body; very large READMEs could cause Worker memory pressure. AbortController timeout exists but no byte cap. - -**Acceptance criteria**: -- [ ] Add `TRIAL_KNOWLEDGE_README_MAX_BYTES` env var (default 64 KB) -- [ ] Stream body via `Response.body` reader; abort when cap exceeded - -### LOW-SEC-1 — `clearClaimCookie()` doesn't mirror `Domain` attribute set during issuance - -`apps/api/src/services/trial/cookies.ts:226-233` vs `claim.ts:119`. Issuance may set `Domain=.${BASE_DOMAIN}`; clear defaults to host-only. Browser keeps the domain-scoped original cookie until natural expiry. Low impact (D1 precondition prevents double-claim) but cookie accumulates. - -**Acceptance criteria**: -- [ ] Pass `cookieDomain` through to `clearClaimCookie()` in `claim.ts` - -### LOW-SEC-2 — `TRIAL_CLAIM_TOKEN_SECRET` absent surfaces as 503 rather than startup-time observability - -`apps/api/src/env.ts:450`. Fail-closed posture is correct, but operator error is only visible via runtime 503s. - -**Acceptance criteria**: -- [ ] Emit a structured ERROR log on first trial request when `isTrialsEnabled` is true but `TRIAL_CLAIM_TOKEN_SECRET` is absent (one-shot dedupe) - -### LOW-SEC-3 — `GET /api/trial/status` and `POST /api/trial/waitlist` unauthenticated with no per-IP rate limit - -`status.ts:27` invokes `TrialCounter` DO on every call with no caching; `waitlist.ts:30` accepts emails from anonymous visitors. Both benefit from `rateLimitAnonymous`. - -**Acceptance criteria**: -- [ ] Apply `rateLimitAnonymous` to `GET /api/trial/status` and `POST /api/trial/waitlist` -- [ ] Optionally: cache `{ count, enabled }` in the status handler's module-scoped cache alongside the kill-switch TTL - -## Out of Scope (Second Security Audit — Stale or Duplicate) - -- **HIGH #1 (rate-limit non-atomic)** — duplicate of HIGH-2 / MEDIUM-CF-3 already deferred with documented rationale; atomic `TrialCounter` DO still protects monthly cap. -- **HIGH #2 ("eventsUrl 404s every trial")** — the "returns 404" claim is STALE. Staging Phase 6 observed 12 SSE events working because the frontend (`apps/web/src/lib/trial-api.ts:154`) bypasses `eventsUrl` and constructs `${API_URL}/api/trial/${trialId}/events` directly. Contract-hygiene issue tracked as MEDIUM-CF-2. -- **MEDIUM #1 (`SameSite=Lax` on claim cookie)** — duplicate of HIGH-3. -- **MEDIUM #2 (unverified fingerprint extraction in create.ts)** — **STALE**. Auditor reviewed lines 273-280; the actually-merged code at lines 288-290 calls `verifyFingerprint(existingFp, secret)` (fix landed in commit `c9d46d02` and was confirmed by the first security audit's own verification pass). No action. - -## References - -- Merged PR: #760 -- First security audit task: `a35608e033ac4405a` -- Cloudflare audit task: `ae38c1e0689c9261e` -- Second security audit task: `a1dafc59ceab016f4` -- Disposition comments: see PR #760 conversation thread diff --git a/tasks/backlog/2026-04-19-trial-orchestrator-boot-test-coverage-gaps.md b/tasks/backlog/2026-04-19-trial-orchestrator-boot-test-coverage-gaps.md deleted file mode 100644 index eb807e3a49..0000000000 --- a/tasks/backlog/2026-04-19-trial-orchestrator-boot-test-coverage-gaps.md +++ /dev/null @@ -1,111 +0,0 @@ -# Trial Orchestrator Boot — Fill Test Coverage Gaps - -> **Reconciliation 2026-09-30 (weekly queue audit): partially shipped; still open.** -> -> - **Shipped:** HIGH-1 on the failure path. `failTrial()` revokes and clears the MCP token -> (`apps/api/src/durable-objects/trial-orchestrator/index.ts:266-276`, tested in -> `apps/api/tests/unit/durable-objects/trial-orchestrator.test.ts:452-510`). Not revoking in -> `handleRunning` is documented as intentional (`trial-orchestrator/steps.ts:1073-1081`). -> - **Still open:** -> - The three crash-boundary resume tests (not in `trial-orchestrator-agent-boot.test.ts`). -> - Argument pinning: `startDiscoveryAgent` args, `acpSessionId` in the `transitionAcpSession` -> calls, and the `userId` passed to `storeMcpToken`. -> - `fetchDefaultBranch` tests for an `AbortError` and an empty `default_branch`. -> - The decision on the silent `'main'` fallback in workspace creation (`steps.ts:694`). -> - Rest of HIGH-1: no revocation in `apps/api/src/scheduled/trial-expire.ts`, and no -> "reused token gets 401" test. -> - HIGH-2: all trials still share the sentinel `userId` in their MCP tokens (`steps.ts:848`), -> with no comment in `apps/api/src/services/mcp-token.ts`. -> - M-1: `default_branch` is used without validation (`steps.ts:252-253`). -> - M-2: `state.mcpToken` stays in DO storage after the agent starts. -> - M-3: ACP reason strings only gained a `trial_orchestrator.` prefix (`steps.ts:1017,1043`). -> - L-1: raw VM-agent error bodies go into error messages -> (`apps/api/src/services/node-agent.ts:98`). -> - **Moot/dropped:** L-2 is verified safe: observations render as plain text -> (`apps/web/src/components/trial/DiscoveryCards.tsx:128,145`). L-3 needed no action. - -## Problem - -Post-merge test-engineer review of PR #764 (`fix(trial): boot discovery agent on VM + detect real default branch`) identified six minor coverage gaps in `apps/api/tests/unit/durable-objects/trial-orchestrator-agent-boot.test.ts` and its sibling `trial-orchestrator-steps.test.ts`. None are correctness risks today — the happy-path flow implicitly exercises the affected code — but each reduces regression surface for future refactors. - -All findings are MINOR / MISSING severity. No CRITICAL or HIGH. The review ran asynchronously and returned after merge. - -## Context - -- PR: https://github.com/raphaeltm/simple-agent-manager/pull/764 (merged `6452c9b1`) -- Review: test-engineer task `a9fe37c165e38c6a2`, completed 2026-04-19 -- Files in scope: - - `apps/api/tests/unit/durable-objects/trial-orchestrator-agent-boot.test.ts` - - `apps/api/tests/unit/durable-objects/trial-orchestrator-steps.test.ts` - - `apps/api/src/durable-objects/trial-orchestrator/steps.ts` (`handleDiscoveryAgentStart`, `fetchDefaultBranch`) - -## Acceptance Criteria - -### Partial-crash resume boundary tests (three missing) - -- [ ] Test: crash after step 2, before step 3 — `agentSessionCreatedOnVm=true`, `mcpToken=null`. Assert steps 1–2 do not fire, steps 3–5 do fire, token is freshly minted and persisted. -- [ ] Test: crash after step 4, before step 5a — `agentStartedOnVm=true`, `acpAssignedOnVm=false`. Assert steps 1–4 do not fire, `transitionAcpSession` fires twice (assigned → running). -- [ ] Test: crash between ACP transitions — `acpAssignedOnVm=true`, `acpRunningOnVm=false`. Assert `transitionAcpSession` fires exactly once with `'running'`, and `acpRunningOnVm=true` afterward. - -### Argument-propagation assertions (two minor) - -- [ ] `startDiscoveryAgent` arguments pinned positionally (`projectId`, `workspaceId`, `sessionTopic` equals `${repoOwner}/${repoName}`). -- [ ] `acpSessionId` (return value from `startDiscoveryAgent`) pinned as `transitionAcpSessionMock.mock.calls[0][2]` and `[1][2]` — currently only call count and target state are asserted. - -### `fetchDefaultBranch` edge cases (two minor) - -- [ ] Test: AbortController fires — mock `fetch` to reject with an `AbortError`; assert `defaultBranch` falls back to `'main'` and `clearTimeout` is invoked (via `vi.useFakeTimers` or spy). -- [ ] Test: 200 response with empty `default_branch` field — assert fallback to `'main'` rather than persisting the empty string. - -### Nice-to-have - -- [ ] Add `userId` assertion to the existing `storeMcpToken` data-argument check (currently skipped). - -### Design deviation — `handleWorkspaceCreation` silent fallback (from post-merge task-completion-validator review `a3dbf4bc16eefef2a`) - -- [ ] Decide between: - - **Option A** (matches original task plan): replace `const branch = state.defaultBranch ?? TRIAL_FALLBACK_BRANCH;` at `apps/api/src/durable-objects/trial-orchestrator/steps.ts:468` with a fail-loud guard — if `!state.defaultBranch`, throw `{ permanent: true }` with a diagnostic message. Add a test that exercises the guard. - - **Option B** (ratify the current behavior): keep the silent fallback but document the rationale inline and in the task file — argue that defence-in-depth against a corrupted/out-of-order state is worth surfacing `'main'` rather than a terminal error that would orphan the workspace row. - -Rationale for filing as backlog: current behavior is functionally safe (both staging repos verified end-to-end) and the fallback branch is the statistically common case. No runtime breakage today. But the implementation silently re-introduces the exact hardcoded-branch pattern this task was designed to eliminate, so future refactors should make a deliberate call. - -### Security follow-ups — from post-merge security-auditor review `aaa5e7c8e74b36d90` - -Two HIGH-severity findings arrived post-merge. Per `.claude/rules/25-review-merge-gate.md`, HIGH findings normally block merge. Because PR #764 was already merged when the review completed, these are filed here as **fast-follow** items and should be fixed in a focused follow-up PR against `sam/trial-onboarding-mvp` before production cut. - -#### HIGH-1: Revoke trial MCP token on orchestrator terminal state (credential lifecycle) - -- [ ] Add `revokeMcpToken(env.KV, state.mcpToken)` call in `TrialOrchestrator.failTrial()` and in the terminal branch of `handleRunning()` at `apps/api/src/durable-objects/trial-orchestrator/index.ts` (mirror the TaskRunner cleanup pattern in `apps/api/src/durable-objects/task-runner/state-machine.ts:265-275`). -- [ ] Also revoke in `scheduled/trial-expire.ts` when the cron sweep transitions a row to `expired` — requires reading the DO's state via the orchestrator stub rather than bypassing the DO. -- [ ] Test: fail a trial mid-flight, then attempt to use the token against a knowledge-tool endpoint and assert 401. - -**Why:** MCP token is minted with the default 4-hour KV TTL (`DEFAULT_MCP_TOKEN_TTL_SECONDS`) but the trial workspace TTL is 20 minutes. The token currently remains valid for up to 4 hours after trial expiry because nothing calls `revokeMcpToken()`. Any party that learns the token (VM process that didn't cleanly exit, logging bug) retains full MCP-tool access to the trial project for that window. - -#### HIGH-2: Document or narrow sentinel `userId` scope in trial MCP tokens - -- [ ] Decide between: - - **Option A** (preferred): mint a per-trial synthetic `userId` (e.g., `trial:{trialId}`) when calling `storeMcpToken()` from `handleDiscoveryAgentStart`. D1 `created_by` values then become trial-unique and future admin queries keyed on `userId` cannot aggregate across trials. - - **Option B**: keep the sentinel `TRIAL_ANONYMOUS_USER_ID` but add an explicit comment in `McpTokenData` and each MCP route handler documenting that `userId === TRIAL_ANONYMOUS_USER_ID` must never be used as a cross-project authorization discriminator. -- [ ] Add a test that the sentinel userId alone cannot authorize access to a different trial's projectId (confirms `projectId` is the isolation boundary, not `userId`). - -**Why:** Every concurrent trial currently shares the same `userId = 'system_anonymous_trials'` in the MCP token. The auditor flagged no active privilege-escalation vector (projectId scoping is enforced in all current handlers), but this is a data-integrity tripwire: any future query or admin tool that lists "all drafts for a user" would aggregate across every concurrent trial. - -#### MEDIUM findings (deferrable, fix opportunistically) - -- [ ] **M-1**: Validate `body.default_branch` return value in `fetchDefaultBranch()` against `^[A-Za-z0-9/_.-]{1,250}$` with rejection of leading hyphens before persisting, so a crafted GitHub API response can't surface strings like `--upload-pack=...` that would be interpreted as git flags in `bootstrap.go:728`. -- [ ] **M-2**: Null out `state.mcpToken` in DO storage after `state.agentStartedOnVm = true` so the token only lives in KV where it's operationally needed. `getStatus()` redacts correctly today, but defence-in-depth against future admin endpoints that might expose raw DO state. -- [ ] **M-3**: Rename ACP transition `reason` strings to accurately describe orchestrator-driven assertion vs. VM-agent confirmation — e.g., `trial_orchestrator.subprocess_launch_called_unconfirmed` instead of `agent_subprocess_started` — so audit logs don't imply VM confirmation that never happened. Or: poll VM agent session-status before transitioning to `running` so `trial.ready` only fires after real liveness. - -#### LOW findings (nice-to-have) - -- [ ] **L-1**: In `nodeAgentRequest()`, redact `token`/`secret`/`authorization` fields from VM-agent error response bodies before including them in thrown error messages (they can otherwise leak into `trial_orchestrator_do.step_error` log events). -- [ ] **L-2**: Audit the frontend `trial.knowledge` renderer to confirm it treats `observation` strings as plain text (GitHub description/README content is emitted raw from the knowledge fast-path and not sanitized server-side). -- [ ] **L-3**: No action needed — `fetchDefaultBranch()` `owner`/`repo` log values are already safe due to upstream `parseGithubRepoUrl()` validation. Documented for closure. - -## References - -- test-engineer review: `/tmp/claude-1000/-workspaces-simple-agent-manager/f0d339c6-df20-4346-9a46-56359d6580eb/tasks/a9fe37c165e38c6a2.output` -- task-completion-validator re-review: `/tmp/claude-1000/-workspaces-simple-agent-manager/f0d339c6-df20-4346-9a46-56359d6580eb/tasks/a3dbf4bc16eefef2a.output` -- security-auditor review: `/tmp/claude-1000/-workspaces-simple-agent-manager/f0d339c6-df20-4346-9a46-56359d6580eb/tasks/aaa5e7c8e74b36d90.output` -- `.claude/rules/25-review-merge-gate.md` (MINOR findings may be deferred to backlog; CRITICAL/HIGH cannot) -- `.claude/rules/10-e2e-verification.md` (capability-test requirements) diff --git a/tasks/backlog/2026-04-19-trial-orchestrator-step-handler-coverage.md b/tasks/backlog/2026-04-19-trial-orchestrator-step-handler-coverage.md deleted file mode 100644 index 7ed65cd2e6..0000000000 --- a/tasks/backlog/2026-04-19-trial-orchestrator-step-handler-coverage.md +++ /dev/null @@ -1,59 +0,0 @@ -# Trial orchestrator — broaden step handler unit tests - -> **Reconciliation 2026-09-30 (weekly queue audit): partially shipped; still open.** -> -> - **Shipped:** some handler tests. Test paths are under `apps/api/tests/unit/`. -> - `handleNodeSelection`: `durable-objects/trial-orchestrator-steps.test.ts:311` and -> `services/relay-trial-native-selection.test.ts:96-133`. -> - `handleNodeProvisioning`, fresh path only: `trial-orchestrator-steps.test.ts:398,448`. -> - `handleNodeAgentReady`: `trial-orchestrator-steps.test.ts:564,577`. -> - `handleWorkspaceCreation`, admission cleanup only: `trial-orchestrator-steps.test.ts:508`. -> - `handleProjectCreation`, happy path and branch re-entry: -> `durable-objects/trial-orchestrator-agent-boot.test.ts:333-422`. -> - **Still open:** source is `apps/api/src/durable-objects/trial-orchestrator/steps.ts`. -> - `handleWorkspaceReady` (`steps.ts:777`) has no tests at all. -> - `handleProjectCreation`: re-entry with `projectId` set; permanent error on the FK violation. -> - `handleNodeProvisioning`: re-entry with `state.nodeId` set (`steps.ts:510-528`). -> - `handleNodeAgentReady`: permanent error on node failure. -> - `handleWorkspaceCreation`: name-collision retry; permanent error on rejection. -> - `handleNodeSelection`: permanent error when there are zero providers. -> - `syncTrialRecord` (`steps.ts:174`): a KV write failure is non-fatal. - -## Problem -`apps/api/src/durable-objects/trial-orchestrator/steps.ts` exports 8 step -handlers. After the wire-up PR, only `handleRunning` and -`handleDiscoveryAgentStart` have direct unit tests -(`tests/unit/durable-objects/trial-orchestrator-steps.test.ts`). - -The remaining 6 handlers rely on drizzle + node-agent + project-data services -and need richer mocks to cover their idempotency + error-classification -branches. - -## Context -- Original wire-up PR: -- Test-engineer review finding #2 (HIGH) was partially addressed in the - wire-up PR; full coverage deferred to this task. -- The `TrialOrchestratorContext` interface - (`durable-objects/trial-orchestrator/types.ts`) is designed to make these - handlers testable as plain functions — the scope here is writing mocks, not - re-architecting. - -## Handlers to cover -- `handleProjectCreation` — idempotency guard when `state.projectId` is set - and the row already exists in D1; permanent-error classification on FK - violation against the sentinel installation row. -- `handleNodeSelection` — healthy existing node branch; no healthy node - branch; permanent-error on zero providers. -- `handleNodeProvisioning` — idempotency: `state.nodeId` set with status - `running` advances without recreating. -- `handleNodeAgentReady` — time-boxed polling; permanent-error on node - failure. -- `handleWorkspaceCreation` — name collision retry; permanent-error on - workspace service rejection. -- `handleWorkspaceReady` — workspace status `error` throws permanent. - -## Acceptance Criteria -- [ ] Each handler has at least one test for its happy path -- [ ] Each handler has at least one test for its idempotency re-entry branch -- [ ] Each handler has at least one test for the permanent-error path -- [ ] `syncTrialRecord` KV write failure is non-fatal (tested) diff --git a/tasks/backlog/2026-04-19-trial-sse-abort-propagation.md b/tasks/backlog/2026-04-19-trial-sse-abort-propagation.md deleted file mode 100644 index e32613c64e..0000000000 --- a/tasks/backlog/2026-04-19-trial-sse-abort-propagation.md +++ /dev/null @@ -1,73 +0,0 @@ -# Trial SSE: propagate client aborts into `TRIAL_EVENT_BUS.fetch('/poll')` - -> **Reconciliation 2026-10-26:** still open; `apps/api/src/routes/trial/events.ts` is unchanged. -> The `/poll` fetch passes no signal (`:133-136`) and `cancel()` is still empty (`:182-184`). The -> cited post-mortem was deleted by #1174 (`cd4c6e83d`); read it with -> `git show cd4c6e83d^:docs/notes/2026-04-19-trial-sse-named-events-postmortem.md`. - -## Problem - -In `apps/api/src/routes/trial/events.ts`, the SSE handler calls -`env.TRIAL_EVENT_BUS.get(id).fetch('/poll?cursor=...&timeout=...')` -inside `ReadableStream.start()`. The `/poll` endpoint long-polls for up -to `TRIAL_SSE_POLL_TIMEOUT_MS` (default 30s on staging, 500ms in the -workers test config). - -When the browser closes the EventSource (user navigates away, tab -closes), `ReadableStream.cancel()` fires on the Worker side — but the -currently in-flight `busStub.fetch('/poll')` is NOT aborted. It -continues running until the DO's poll timeout elapses, then resolves -with an empty event list that gets discarded. - -Impact: -- Each disconnected client keeps one DO thread blocked for up to - `TRIAL_SSE_POLL_TIMEOUT_MS` after disconnect. -- Under bursty trial traffic this can pin DO isolates for no reason. -- Cost in CPU-seconds that never produced any user-visible work. - -This is a **pre-existing** architectural issue — my SSE-contract fix -(unnamed frames) did not introduce it. Flagged by -`cloudflare-specialist` review on PR for `sam/pick-where-previous-session-01kpk2` -as HIGH and scope-expansion-out-of-band for the fix PR. - -## Research findings - -- `apps/api/src/routes/trial/events.ts` creates the - `ReadableStream` and holds a closure over the DO stub. The `cancel()` - callback would need to surface an `AbortSignal` into the active - `busStub.fetch(...)` call. -- `busStub.fetch()` accepts a `RequestInit` with `signal`. The DO's - `/poll` handler already races the wait-queue against its `timeoutMs` - timer. If the DO side also respects the client abort, the long-poll - can exit early. -- `apps/api/src/durable-objects/trial-event-bus.ts` holds an internal - promise queue keyed on cursor; confirm an aborted fetch cleanly - removes its waiter instead of leaking. - -## Implementation checklist - -- [ ] Create an `AbortController` per `start()` invocation -- [ ] Pass `controller.signal` into `busStub.fetch('/poll', { signal })` -- [ ] Wire `cancel()` to call `controller.abort()` -- [ ] In `TrialEventBus` DO `/poll` handler, also listen for the - incoming request's abort signal and remove the waiter from the - queue on abort (no dangling promise resolution) -- [ ] Unit test: open stream, simulate client cancel mid-long-poll, - assert the DO waiter map is empty after abort -- [ ] Consider whether the same pattern is needed for the heartbeat - loop's setTimeout — `cancel()` already should clear it but verify - -## Acceptance criteria - -- Closing the browser tab mid-long-poll no longer keeps the DO thread - blocked for the remaining timeout window -- Existing unit/capability tests still pass -- Staging verification: open SSE, close tab, confirm DO poll count - (via logs or a test probe) drops immediately - -## References - -- Post-mortem: `docs/notes/2026-04-19-trial-sse-named-events-postmortem.md` -- Pre-existing code: `apps/api/src/routes/trial/events.ts` -- `cloudflare-specialist` review on PR for branch - `sam/pick-where-previous-session-01kpk2` diff --git a/tasks/backlog/2026-04-19-trial-sse-cursor-persistence.md b/tasks/backlog/2026-04-19-trial-sse-cursor-persistence.md deleted file mode 100644 index 6bb5069008..0000000000 --- a/tasks/backlog/2026-04-19-trial-sse-cursor-persistence.md +++ /dev/null @@ -1,83 +0,0 @@ -# Trial SSE: persist `nextCursor` to DO storage across restarts - -> **Reconciliation 2026-10-26:** still open. The `TrialEventBus` migration (v8, `new_classes`) is -> now `apps/api/wrangler.toml:423-424`, not line 157. Only the `closed` flag is persisted -> (`trial-event-bus.ts:66,129,186`); `nextCursor` is still in memory (`:49`). Rule 07 forbids -> rewriting the applied v8 entry, so option 1 cannot be done by editing it. - -## Problem - -`TrialEventBus` DO holds the in-memory event buffer and the -`nextCursor` (monotonic counter) in instance state only. When the DO -is evicted (memory pressure, deploy, host migration), both are lost. - -Symptoms on reincarnation: -- New cursor sequence starts from 0, potentially colliding with - cursors the client has already seen and ack'd -- Client's `Last-Event-ID` / resume cursor becomes meaningless -- In the worst case, the client re-receives old events with a lower - cursor than it currently has, breaking ordering assumptions - -This is **pre-existing** in the TRIAL_EVENT_BUS DO design; the SSE -contract fix on PR for `sam/pick-where-previous-session-01kpk2` does -not introduce or worsen it. Flagged by `cloudflare-specialist` review -as MEDIUM. - -## Research findings - -- `apps/api/src/durable-objects/trial-event-bus.ts` — confirm which - fields live in-memory vs persisted -- The DO class is NOT marked `new_sqlite_classes` in wrangler.toml - (line 157: `new_classes = ["TrialEventBus"]`). An intentional - decision: "in-memory only — no SQLite storage needed for - short-lived trial streams" — but the short-lived assumption breaks - if the DO gets evicted mid-trial -- Trials live for up to `TRIAL_WORKSPACE_TTL_MS` (20 min default). - DO eviction during a 20-min window is plausible on deploys. - -## Options - -1. **Switch to SQLite-backed DO.** Add a migration block promoting - `TrialEventBus` to `new_sqlite_classes`. Persist `nextCursor` + a - bounded ring buffer of recent events. Higher storage cost but - crash-resistant. - -2. **Seed cursor from wall-clock on re-init.** Use `Date.now()` as - the monotonic base so reincarnation can't collide with past - values. Doesn't preserve event replay but prevents cursor - duplication. - -3. **Accept the loss.** Document that mid-trial DO eviction will - end the stream; force the client to restart from cursor 0. - -Option 2 is the minimum-viable fix; option 1 is the correct fix. - -## Implementation checklist (option 2 — cheap) - -- [ ] On DO init, if `nextCursor` is not set, seed it with - `Date.now()` (microsecond precision if possible) -- [ ] Document the behavior in the DO's header comment -- [ ] Unit test: simulate DO re-init, assert `nextCursor` > all - previously-issued cursors - -## Implementation checklist (option 1 — correct) - -- [ ] Add a SQLite migration in wrangler.toml promoting the class -- [ ] Persist `nextCursor` + a bounded ring of recent events on - every append -- [ ] Add a `getAfter(cursor)` method that loads from SQLite -- [ ] Migration considerations — existing DOs won't have SQLite - bindings; plan for a zero-downtime migration - -## Acceptance criteria - -- DO re-incarnation does not produce duplicate cursors -- If option 1: events from before eviction are still replayable - from storage - -## References - -- Pre-existing code: `apps/api/src/durable-objects/trial-event-bus.ts` -- wrangler.toml line 157 -- `cloudflare-specialist` review on PR for branch - `sam/pick-where-previous-session-01kpk2` diff --git a/tasks/backlog/2026-04-20-platform-trial-enabled-env-var.md b/tasks/backlog/2026-04-20-platform-trial-enabled-env-var.md deleted file mode 100644 index b9e0ec96e3..0000000000 --- a/tasks/backlog/2026-04-20-platform-trial-enabled-env-var.md +++ /dev/null @@ -1,39 +0,0 @@ -# PLATFORM_TRIAL_ENABLED env var to disable trial on self-hosted - -> **Reconciliation 2026-11-02:** still open; pointer moved. #2480 (`af45a52b0`) split the admin settings registry, so `trials.enabled` is now defined in `apps/api/src/services/admin-settings-features-definitions.ts:50-56` (not `admin-settings-registry.ts:476-480`). `getTrialStatus()` (`platform-trial.ts`) is unchanged and still has no availability switch. - -> **Reconciliation 2026-10-26:** still open; `getTrialStatus()` (`platform-trial.ts:61-93`) has no -> switch. #2304 (`980cef76c`) moved the anonymous `/try` switch from KV to the admin setting -> `trials.enabled` (`apps/api/src/services/admin-settings-registry.ts:476-480`; -> `services/trial/kill-switch.ts:34-36`), so the `kill-switch.ts:44-72` pointer is gone. Rule 07 -> now puts new runtime switches in that registry, not in an env var or `[vars]`. - -> **Reconciliation 2026-09-30:** still open, but needs rescoping. Platform-trial availability -> means a platform cloud credential exists and `AI_PROXY_ENABLED` is not false -> (`apps/api/src/services/platform-trial.ts:27-56`). The anonymous `/try` flow has its own KV -> switch, off by default (`apps/api/src/services/trial/kill-switch.ts:44-72`). -> `platform-trial.ts:87` still advertises `agentType: 'opencode'`, although PR #1431 removed -> platform OpenCode. A real flag would also need server-side enforcement, because provisioning -> falls back to the platform credential regardless of this status. - -## Problem -Self-hosted admins may not want to offer a trial/onboarding flow. Currently there's no way to fully disable it without removing platform credentials. - -## Proposal -Add a `PLATFORM_TRIAL_ENABLED` environment variable (default: `"true"`) that allows self-hosted admins to completely disable the trial/onboarding flow. - -When disabled: -- `getTrialStatus()` returns `{ eligible: false }` -- No trial UI surfaces (TryDiscovery, ChatGate, etc.) -- Platform behaves as pre-trial — users must bring their own credentials - -## Implementation Notes -- Add to `apps/api/src/env.ts` as optional string -- Check in `getTrialStatus()` in `apps/api/src/services/platform-trial.ts` -- Add to wrangler.toml `[vars]` with default `"true"` -- Document in env-reference and self-hosting guide - -## Acceptance Criteria -- [ ] `PLATFORM_TRIAL_ENABLED=false` makes trial unavailable for all users -- [ ] Default behavior (unset or `"true"`) is unchanged -- [ ] Self-hosting guide documents the variable diff --git a/tasks/backlog/2026-04-22-infrastructure-nav-and-platform-infra-admin.md b/tasks/backlog/2026-04-22-infrastructure-nav-and-platform-infra-admin.md index 20328ac314..31eb685d0f 100644 --- a/tasks/backlog/2026-04-22-infrastructure-nav-and-platform-infra-admin.md +++ b/tasks/backlog/2026-04-22-infrastructure-nav-and-platform-infra-admin.md @@ -85,3 +85,8 @@ Separately, admins need a dedicated operational surface for monitoring platform- - `.claude/rules/09-task-tracking.md` - `.claude/rules/14-do-workflow-persistence.md` - `.claude/rules/17-ui-visual-testing.md` + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: PR #994, PR #2403 (NavSidebar.tsx Infrastructure link ungated); PR #2588 removed trials; AuthProvider.tsx:48 exposes only isSuperadmin; no /api/admin/platform-infra routes +- Status: Nav half shipped and trial context moot; remaining: admin capability flags, node-association metadata, platform-infra admin API and page for admin role diff --git a/tasks/backlog/2026-04-24-session-header-a11y-token-fixes.md b/tasks/backlog/2026-04-24-session-header-a11y-token-fixes.md index cdf022e248..8d7094220a 100644 --- a/tasks/backlog/2026-04-24-session-header-a11y-token-fixes.md +++ b/tasks/backlog/2026-04-24-session-header-a11y-token-fixes.md @@ -93,3 +93,8 @@ The session header enhancements (PR #804) shipped with several accessibility gap - [ ] `hasDetails` constant removed, guards simplified - [ ] Playwright visual audit spec added with long-ID mock data scenarios - [ ] `allowedHosts: true` in vite.config.ts documented or reverted + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #1,#4,#9,#11 shipped earlier; undefined tokens gone after header split (#2535/#2594); CopyableId.tsx no aria-live; SessionToolRail.tsx:175 aria-expanded without aria-controls; SessionHeaderDetails.tsx icon only for completed; vite.config.ts:118 allowedHosts undocumented +- Status: Remaining: copy announcement (#6), aria-controls (#7), failed icon (#8), cancelled/sleeping/expired badge (#10), allowedHosts comment (#12) diff --git a/tasks/backlog/2026-05-01-fix-playwright-desktop-test-infrastructure.md b/tasks/backlog/2026-05-01-fix-playwright-desktop-test-infrastructure.md deleted file mode 100644 index 09143a79d3..0000000000 --- a/tasks/backlog/2026-05-01-fix-playwright-desktop-test-infrastructure.md +++ /dev/null @@ -1,26 +0,0 @@ -# Fix Playwright Desktop Test Infrastructure - -> **Reconciliation 2026-10-26:** #2389 (`0a0276390`) deleted `triggers-ui-audit.spec.ts` when -> Triggers became the Automation page (`automation-audit.spec.ts`, which runs at 1280x800), so -> that criterion is moot. `profiles-ui-audit.spec.ts` still skips its desktop tests (`:310-312`) -> and is quarantined (`visual-audit-quarantine.txt:70`); the root cause is still unrecorded. - -## Problem - -Desktop-viewport Playwright visual audit tests crash with an error boundary exception before any page data loads. The error is "Cannot read properties of undefined (reading 'length')" and occurs in the desktop layout rendering path, not in any specific component being tested. - -This affects multiple test files: -- `apps/web/tests/playwright/profiles-ui-audit.spec.ts` (desktop tests skipped) -- `apps/web/tests/playwright/triggers-ui-audit.spec.ts` (desktop tests also affected) -- Likely any other Playwright visual audit running at desktop viewport (1280x800) - -## Context - -Discovered during the profiles mobile layout fix (PR on branch `sam/try-mock-profiles-page-01kqh7`). Mobile tests (375x667) work correctly with mocked API data, but desktop tests crash immediately regardless of mock data quality. - -## Acceptance Criteria - -- [ ] Desktop Playwright visual audits run without error boundary crashes -- [ ] `profiles-ui-audit.spec.ts` desktop tests pass -- [ ] `triggers-ui-audit.spec.ts` desktop tests pass -- [ ] Root cause identified and documented diff --git a/tasks/backlog/2026-05-01-wp6-openai-routing-integration-test.md b/tasks/backlog/2026-05-01-wp6-openai-routing-integration-test.md index e227965433..dbc2713ac1 100644 --- a/tasks/backlog/2026-05-01-wp6-openai-routing-integration-test.md +++ b/tasks/backlog/2026-05-01-wp6-openai-routing-integration-test.md @@ -13,3 +13,8 @@ Discovered by the task-completion-validator after PR merge. - [ ] Asserts correct AI Gateway URL structure (account ID, gateway ID, provider path) - [ ] Tests both streaming and non-streaming OpenAI requests - [ ] Verifies OpenAI credential resolution path (CF_AIG_TOKEN or platform credential) + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: apps/api/tests/unit/routes/ai-proxy-accounting.test.ts:351 covers OpenAI Responses forwarding; no test drives forwardToOpenAI chat-completions branch (ai-proxy-upstream.ts:203) asserting the gateway /openai/v1/chat/completions URL +- Status: Remaining: route-level OpenAI chat-completions URL test, streaming and non-streaming diff --git a/tasks/backlog/2026-07-12-multi-installation-cloudflare-namespaces.md b/tasks/backlog/2026-07-12-multi-installation-cloudflare-namespaces.md index 47c7e0cf74..25276e4bd0 100644 --- a/tasks/backlog/2026-07-12-multi-installation-cloudflare-namespaces.md +++ b/tasks/backlog/2026-07-12-multi-installation-cloudflare-namespaces.md @@ -92,3 +92,8 @@ The first groundwork slice should make a deployment such as `dev-a.sammy.party` - `tasks/archive/2026-06-13-app-route-dns-and-environment-teardown-cleanup.md` - `apps/www/src/content/docs/docs/guides/self-hosting.mdx` - `apps/www/src/content/docs/docs/reference/configuration.md` + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #2475 added infra/resources/config.ts:zoneRelativeDnsName used by infra/resources/dns.ts; apps/api/src/services/dns-core.ts:198 still sends ws-${id}; dns-node-backend.ts:81 still sends ${nodeId}.vm; scripts/deploy/sync-wrangler-config.ts:563-571 still sets zone_name: baseDomain +- Status: Pulumi nested-domain DNS shipped; remaining: fully qualified runtime DNS names, Wrangler routes by zone_id, docs diff --git a/tasks/backlog/2026-07-16-observability-mcp-outcome-parsing-gap.md b/tasks/backlog/2026-07-16-observability-mcp-outcome-parsing-gap.md index 11f7c95608..9e3c3cf0f1 100644 --- a/tasks/backlog/2026-07-16-observability-mcp-outcome-parsing-gap.md +++ b/tasks/backlog/2026-07-16-observability-mcp-outcome-parsing-gap.md @@ -33,3 +33,8 @@ local regression tests instead. - Do NOT fix in the sessions-list PR — this is a tooling/integration change, filed separately per that task's instructions. - Workaround today: `wrangler tail --env ` or local Miniflare repro. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #2504 added ops_query_worker_logs MCP tool (apps/api/src/services/worker-log-query.ts; observability-logs.ts reads workers?.outcome as optional); documented in apps/www/src/content/docs/docs/guides/agents.md +- Status: Outcome-tolerant MCP path exists; remaining: staging check that mid-request console.error lines are returned diff --git a/tasks/backlog/2026-08-03-durable-follow-up-prompt-delivery.md b/tasks/backlog/2026-08-03-durable-follow-up-prompt-delivery.md index 59b11ab713..6576f8bc26 100644 --- a/tasks/backlog/2026-08-03-durable-follow-up-prompt-delivery.md +++ b/tasks/backlog/2026-08-03-durable-follow-up-prompt-delivery.md @@ -69,3 +69,7 @@ Convert follow-up prompt submission into durable accept + server-owned delivery: - Duplicate retries or ambiguous acknowledgements do not create duplicate VM messages. - Failed follow-up deliveries are visible and retryable. +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #1785 (server durable accept/runner), #2291 (server Idempotency-Key via cliOperationReceipt), #2536 (web consumes mailbox.delivery_updated via lib/prompt-delivery-update.ts, steer rows only); apps/web/src/lib/api/session-prompts.ts:22-39 sends no idempotency key +- Status: Remaining: web idempotency key, queued/delivering/failed state for normal follow-ups on refresh, retry UI for failed deliveries diff --git a/tasks/backlog/2026-08-04-sleeping-status-renders-as-unknown.md b/tasks/backlog/2026-08-04-sleeping-status-renders-as-unknown.md index bc7de2a2cd..3af837c922 100644 --- a/tasks/backlog/2026-08-04-sleeping-status-renders-as-unknown.md +++ b/tasks/backlog/2026-08-04-sleeping-status-renders-as-unknown.md @@ -67,3 +67,8 @@ is checking whether their work survived. — the fallback silently hides every one of them - [ ] Simplify the "Don't read too much into the badges" paragraph in `guides/instant-sessions.md` once the label is correct + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #2230 added sleeping to StatusBadge statusConfig; health_status='unhealthy' still written at vm-agent-container-runtime.ts:178,213 and session-sleep-teardown.ts:307; NodeOverviewSection.tsx:53 renders the health badge (NodeCard.tsx removed by #2528) +- Status: Remaining: sleeping node shown Unhealthy, Playwright audit, audit of other missing statuses, unused STATUS_LABELS diff --git a/tasks/backlog/2026-08-07-pre-destroy-safe-evidence-capture.md b/tasks/backlog/2026-08-07-pre-destroy-safe-evidence-capture.md index b6d7d49aec..744c760101 100644 --- a/tasks/backlog/2026-08-07-pre-destroy-safe-evidence-capture.md +++ b/tasks/backlog/2026-08-07-pre-destroy-safe-evidence-capture.md @@ -34,3 +34,8 @@ Raphaël has explicitly prioritized preserving VM evidence at incident time befo - `tasks/archive/2026-08-07-debugging-experience-overhaul.md` (origin of this follow-up) - `tasks/archive/2026-08-05-complete-local-debugging-experience.md` (safe snapshot framework) - `.claude/rules/47-control-loop-io-budget.md`, `.claude/rules/53-scheduled-handler-isolation-and-liveness-signals.md` + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #2502 black box recorder: services/node-log-capture.ts captureNodeLogsBeforeTeardown called from strict-node-deletion.ts:301 (cleanup sweep path via deleteNodeResourcesStrict) and captureNodeLogsOnUnhealthy (unhealthy-nodes.ts:415) +- Status: Pre-teardown capture shipped as raw superadmin-only logs (policy a35180d5); the raw capture does not satisfy this file's criteria. Still required: vm-agent self-capture on heartbeat failure, a safe incident snapshot at reap time, and canary-secret coverage for the new capture triggers (unless a human explicitly drops them) diff --git a/tasks/backlog/2026-09-23-playwright-audit-shell-mocks-crash.md b/tasks/backlog/2026-09-23-playwright-audit-shell-mocks-crash.md index 8390be4fb8..321d44ab31 100644 --- a/tasks/backlog/2026-09-23-playwright-audit-shell-mocks-crash.md +++ b/tasks/backlog/2026-09-23-playwright-audit-shell-mocks-crash.md @@ -45,3 +45,8 @@ mocking `/api/credentials*`, `/api/github/installations`, `/api/workspaces`, spec broken by the same cause is fixed - [ ] The default `{}` fallback in `setupAuditRoutes` fails loudly (or logs) for unmatched `/api/**` paths so the next new shell fetch is noticed + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #2439, #2481 per-spec mocks; admin-trials-audit.spec.ts deleted by #2588; apps/web/tests/playwright/audit-routes.ts:106 still returns {} +- Status: Remains: central array defaults + wizard dismissal in setupAuditRoutes, loud fallback, full-corpus run (example spec now gone) diff --git a/tasks/backlog/2026-10-21-composer-audit-provisioning-progress-test-fails-on-main.md b/tasks/backlog/2026-10-21-composer-audit-provisioning-progress-test-fails-on-main.md deleted file mode 100644 index 0d19d5d2b2..0000000000 --- a/tasks/backlog/2026-10-21-composer-audit-provisioning-progress-test-fails-on-main.md +++ /dev/null @@ -1,26 +0,0 @@ -# Composer audit: "restored provisioning session" Playwright test fails on main - -## Problem - -`apps/web/tests/playwright/project-chat-composer-audit.spec.ts` › "restored provisioning session shows staged progress without overflow" fails on `main` (c0fb8edd8) at both 375×667 and 1280×800: - -``` -Locator: getByText('Installing dependencies (3/4)') -Expected: visible -Error: element(s) not found -``` - -The page renders the mocked session as "Running" with its messages and a "Reconnecting..." alert, but no provisioning progress block. Either the progress UI no longer renders for a restored `queued` task with `executionStep: 'workspace_ready'`, or the spec's mocks no longer match how the page loads provisioning state. - -## Context - -Found on 2026-10-21 while running the composer audit for the new-chat profile picker (branch `sam/new-chat-profile-picker`). Reproduced with `main`'s `apps/web` checked out, so it is unrelated to that branch. - -Repro: `cd apps/web && npx playwright test tests/playwright/project-chat-composer-audit.spec.ts -g "restored provisioning" --project="Desktop (1280x800)"`. - -## Acceptance criteria - -- [ ] Find whether the product regressed (restored provisioning sessions no longer show staged progress) or the spec's mocks drifted. -- [ ] If the product regressed, fix it and add a unit test through the real restore path. -- [ ] If the mocks drifted, update the spec to drive the real data path the page uses today. -- [ ] The test passes at 375×667 and 1280×800. diff --git a/tasks/backlog/2026-10-22-trigger-field-errors-not-announced.md b/tasks/backlog/2026-10-22-trigger-field-errors-not-announced.md index 4c0a230d0e..09c01e47c5 100644 --- a/tasks/backlog/2026-10-22-trigger-field-errors-not-announced.md +++ b/tasks/backlog/2026-10-22-trigger-field-errors-not-announced.md @@ -29,3 +29,8 @@ predate that change and were left as they were to keep the prototype's diff focu - [ ] Component tests assert the accessible description while an error is shown and its absence after it is fixed, as the email field test does. - [ ] Playwright audit of the editor's error states at 375 px and 1280 px still passes. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #2447 moved GitHub filter fields onto shared Field helper; steps-start-when.tsx:156-159,185-188 still render separate

for errors.github/errors.webhook; WebhookTriggerFields.tsx has no aria-invalid +- Status: Remaining: wire step-level github/webhook errors into the fields and drop the alert siblings. diff --git a/tasks/backlog/2026-10-24-cap-linked-chats-per-idea.md b/tasks/backlog/2026-10-24-cap-linked-chats-per-idea.md index 6232a4d2bf..24bd12ef53 100644 --- a/tasks/backlog/2026-10-24-cap-linked-chats-per-idea.md +++ b/tasks/backlog/2026-10-24-cap-linked-chats-per-idea.md @@ -55,3 +55,8 @@ the shape rule 74 warns about. Decide the ranking before writing the cap: - `.claude/rules/65-capped-selection-must-rank-and-disclose.md` - `apps/api/.claude/rules/74` equivalent: `.claude/rules/74-proxy-signals-must-match-the-condition.md` - `.claude/rules/60-request-io-and-bundle-budgets.md` + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #2436: per-target cap via operations.resourceLinkBatchPerTargetCap (operations/link-core.ts:48, project-data/links.ts) with atLeast disclosure +- Status: Remaining: ranking by deriveIdeaStatus purpose, skew test, round-trip assertion, and the disclosure criterion: `atLeast` gives only a lower bound and the idea-links endpoint does not page omitted chats, so the response does not yet say the total or how to get the rest. diff --git a/tasks/backlog/2026-10-24-chat-drawer-translucency-on-phones.md b/tasks/backlog/2026-10-24-chat-drawer-translucency-on-phones.md index 55d7e91dd4..fd3ae5a1e6 100644 --- a/tasks/backlog/2026-10-24-chat-drawer-translucency-on-phones.md +++ b/tasks/backlog/2026-10-24-chat-drawer-translucency-on-phones.md @@ -46,3 +46,8 @@ Affected files, all with the same two lines: concluding the blur was the fix. - [ ] Light mode checked too: `--sam-glass-bg-modal` is 60% there, so the bleed-through is at least as visible. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #2506 moved all five drawers onto one shared apps/web/src/components/shell/GlassSheet.tsx (AC: one place); each still passes backdrop="desktop" (scrim hidden below md) +- Status: Remaining: decide/implement phone legibility (opaque full-screen pane or scrim) and screenshots. diff --git a/tasks/backlog/2026-10-24-regenerate-ideas-feature-screenshot.md b/tasks/backlog/2026-10-24-regenerate-ideas-feature-screenshot.md index be0a64bc11..a8f2a28c4e 100644 --- a/tasks/backlog/2026-10-24-regenerate-ideas-feature-screenshot.md +++ b/tasks/backlog/2026-10-24-regenerate-ideas-feature-screenshot.md @@ -24,3 +24,8 @@ stay accurate after the new one lands. The image itself is what needs replacing. `apps/www/src/content/CLAUDE.md` (real components, mock data, dark and light). - [ ] Replace `/images/features/sam-ideas-detail.png` and restore label-specific alt text. - [ ] Check the `/features/automation` page at phone and desktop widths. + +## Reconciliation (2026-11-09 weekly queue sweep) + +- Evidence: #2449 re-captured sam-ideas-detail(-light) and rewrote alt text/captions (apps/www/src/data/features/automation.json); capture test updated +- Status: Remaining: decide whether a Start work button/sheet shot is wanted, then phone/desktop check of /features/automation. diff --git a/tasks/backlog/2026-11-04-heartbeat-workspace-memory-not-reported.md b/tasks/backlog/2026-11-04-heartbeat-workspace-memory-not-reported.md deleted file mode 100644 index 89a10f59f4..0000000000 --- a/tasks/backlog/2026-11-04-heartbeat-workspace-memory-not-reported.md +++ /dev/null @@ -1,21 +0,0 @@ -# VM heartbeats almost never carry per-workspace memory - -## Problem - -The VM agent is meant to add `metrics.workspaceMemory[]` (live memory per workspace container) to each node heartbeat (`packages/vm-agent/internal/server/health.go`, `collectWorkspaceMemoryMetrics`), and the API stores it in `nodes.last_metrics`. On staging, only **2 of 183** VM nodes have ever had it, the latest on **2026-09-08**. A VM running a lightweight workspace on 2026-11-04 (node `01M6M5908QESNY0EER04Q4WF5Z`, workspace `01M6M5JA5Z7CGCNWEHBPA370DA`) heartbeated every minute with `cpuLoadAvg1`, `memoryPercent` and `diskPercent` but no `workspaceMemory`. - -Consumers that expect it: - -- The scheduler's measured-admission check reads `workspaceMemory` (`apps/api/src/services/workspace-resource-capacity.ts`), so it is deciding without per-workspace live memory. -- The Nodes page (`apps/web/src/components/node/usage/node-resource-model.ts`, `liveMemoryByWorkspace`) uses it for "now" memory and the live dot; without it, it falls back to the newest resource-history minute (up to ~15 minutes old). - -## Context - -Found during staging verification of the Nodes page redesign (task `01M6KHM7JE54SN3P23EK4S1NFY`, branch `sam/nodes-page-live-usage`). Likely causes to check, in order: workspaces whose runtime has no `ContainerLabelValue` (lightweight workspaces?), the "all or nothing" `len(labelValues) > limit` return, and Docker stats errors, which are logged only at `slog.Debug` and so are invisible in production (`.claude/rules/39`). - -## Acceptance Criteria - -- [ ] Root cause identified from VM agent logs (raise the stats-unavailable log above Debug first if needed) -- [ ] A running VM workspace (lightweight and full) reports `workspaceMemory` in its heartbeat on staging, confirmed in `nodes.last_metrics` -- [ ] A failure to collect is logged at a level visible in production, with the reason -- [ ] Test covering a lightweight workspace's heartbeat including its memory diff --git a/tasks/backlog/2026-11-05-ci-test-job-timeout-margin.md b/tasks/backlog/2026-11-05-ci-test-job-timeout-margin.md deleted file mode 100644 index 4cf7b73a1c..0000000000 --- a/tasks/backlog/2026-11-05-ci-test-job-timeout-margin.md +++ /dev/null @@ -1,15 +0,0 @@ -# CI `Test` job runs within minutes of its 20-minute timeout - -## Problem - -The CI `Test` job (`.github/workflows/ci.yml`, `timeout-minutes: 20`) took 16 to 19.5 minutes on `main` on 2026-11-05: runs ending 15:50, 16:09 and 17:10 UTC. On PR #2539 it was cancelled at 20:00 by the timeout once (run 42081932084, job 127437975709), then passed on rerun in 15m25s. The `apps/web` coverage run alone took about 12 minutes of it. A slower runner, or a modest suite growth, will turn this into routine false failures. - -## Context - -Found while shepherding PR #2539 (reliable workspace shutdown). The timed-out run was still executing `@simple-agent-manager/api:test:coverage` when it was cancelled. Turbo prints a package's output only when that package finishes, so the log shows nothing from it. - -## Acceptance Criteria - -- [ ] Measure per-package durations in the `Test` job over recent `main` runs. -- [ ] Either shard the job (as the Durable Object Workers job already is), or raise the timeout with a stated margin and an owner to revisit it. -- [ ] Recent `main` runs show at least 25% headroom under the timeout. diff --git a/tasks/backlog/2026-11-07-fix-preexisting-chat-playwright-audit-failures.md b/tasks/backlog/2026-11-07-fix-preexisting-chat-playwright-audit-failures.md index 9dc0f9078c..bd817d00b4 100644 --- a/tasks/backlog/2026-11-07-fix-preexisting-chat-playwright-audit-failures.md +++ b/tasks/backlog/2026-11-07-fix-preexisting-chat-playwright-audit-failures.md @@ -31,3 +31,12 @@ and does not run in CI at all. That is why these went unnoticed. - [ ] `project-chat-composer-audit.spec.ts` is removed from the quarantine list once it passes - [ ] Decide whether CI should also run the iPhone SE (375x667) and Desktop (1280x800) projects for these chat audits, since both failures above only appear at viewports CI does not run + +## Merged from `2026-10-21-composer-audit-provisioning-progress-test-fails-on-main.md` (2026-11-09) + +That file first reported the "restored provisioning session" failure on `main` `c0fb8edd8`: the page +renders the mocked session as "Running" with a "Reconnecting..." alert and no provisioning block +(`getByText('Installing dependencies (3/4)')` not found). If it is a product regression, the fix +needs a unit test through the real restore path; if the mocks drifted, the spec must drive the data +path the page uses today. Repro: `cd apps/web && npx playwright test +tests/playwright/project-chat-composer-audit.spec.ts -g "restored provisioning" --project="Desktop (1280x800)"`. diff --git a/tasks/backlog/2026-11-07-sam-assistant-messages-as-pointers.md b/tasks/backlog/2026-11-07-sam-assistant-messages-as-pointers.md deleted file mode 100644 index f1e51b0079..0000000000 --- a/tasks/backlog/2026-11-07-sam-assistant-messages-as-pointers.md +++ /dev/null @@ -1,34 +0,0 @@ -# /sam assistant messages to task agents must arrive as pointers (constitution XV) - -## Problem - -Constitution principle XV (Human Voice Is Reserved, added 2026-11-07) says only human-written text may -reach an agent as a plain chat message. The /sam assistant's own `send_message_to_subtask` tool -(`apps/api/src/durable-objects/sam-session/tools/send-message-to-subtask.ts`) still breaks it. It -persists model-written text through `persistOrchestrationPrompt` and sends it with -`sendPromptToAgentOnNode` as a user prompt. When the target is busy, the 409 fallback enqueues it with -`senderType: 'human'`. - -The /sam `dispatch_task` and `retry_subtask` tools were fixed in the Human Voice PR: the child's first -message ends with a SAM-assistant author line (`samAssistantAttribution`). The MCP messaging tools moved -to pair channels in the same PR. The /sam assistant cannot use -them directly: a /sam conversation has no task-backed chat session to own a pair subscription. - -A related edge, recorded but not decided: GitHub-trigger templates are human-authored, but -`renderedPrompt` can interpolate GitHub-supplied text such as PR titles and bodies -(`services/github-trigger-queue.ts`). Raphaël put trigger templates out of scope for the first PR. - -## Context - -Found while implementing idea `01M6VEW6VYZ39YNHSW28836QWP` (peer steer rendered as a user bubble in -chat `fbcca13b-b4ab-4e62-8e3b-ccdaa3f2a57d`). The assistant is opt-in and off by default. - -## Acceptance Criteria - -- [ ] A /sam message to a task agent reaches the agent's chat only as a SAM-authored notice with an - ID. The agent reads the text through a tool that marks it as written by the SAM assistant and - untrusted. -- [ ] The 409 queue fallback no longer records model text with `senderType: 'human'`. -- [ ] Decide with Raphaël whether interpolated GitHub text in trigger templates must become a - pointer, and record the decision. -- [ ] Tests drive the real /sam tool and assert the target transcript never contains the model text. diff --git a/tasks/backlog/2026-11-08-heartbeat-workspace-memory-missing.md b/tasks/backlog/2026-11-08-heartbeat-workspace-memory-missing.md index 7c279b4d26..abb66973d1 100644 --- a/tasks/backlog/2026-11-08-heartbeat-workspace-memory-missing.md +++ b/tasks/backlog/2026-11-08-heartbeat-workspace-memory-missing.md @@ -38,3 +38,16 @@ need a temporary log-level change), and check `ContainerMode` and vm-agent and use it in `resolveTrustedWorkspaceNodeCapacity`, with provisioning using the same figure (rule 69: one accounting policy) - [ ] Tests through the real heartbeat route and the real admission SQL + +## Merged from `2026-11-04-heartbeat-workspace-memory-not-reported.md` (2026-11-09) + +That file reported the same gap from staging: only 2 of 183 staging VM nodes had ever reported +`workspaceMemory` (latest 2026-09-08), and a lightweight workspace on node +`01M6M5908QESNY0EER04Q4WF5Z` heartbeated with no `workspaceMemory`. Suspects it listed: runtimes +with no `ContainerLabelValue` (lightweight workspaces?), the all-or-nothing `len(labelValues) > limit` +return, and Docker stats errors logged only at `slog.Debug`. The Nodes page +(`node-resource-model.ts`, `liveMemoryByWorkspace`) also depends on it. + +- [ ] Both a lightweight and a full VM workspace report `workspaceMemory`, with a test covering the + lightweight case +- [ ] A failure to collect is logged at a level visible in production, with the reason diff --git a/tasks/backlog/2026-11-08-sam-assistant-subtask-message-pointer.md b/tasks/backlog/2026-11-08-sam-assistant-subtask-message-pointer.md index 0ba1f73f8d..5e8d8cae10 100644 --- a/tasks/backlog/2026-11-08-sam-assistant-subtask-message-pointer.md +++ b/tasks/backlog/2026-11-08-sam-assistant-subtask-message-pointer.md @@ -20,3 +20,12 @@ Found while shipping SAM notice rows (PR #2575). The first version of that PR fi - [ ] The chat row shows a notice that the message came from the user's SAM assistant, with the text quoted as not written by SAM. - [ ] Fails closed when the pointer transport is unavailable. - [ ] Workers test through the real tool: a running task receives the pointer, its chat shows the notice, and the plain text never appears in the delivered content. + +## Merged from `2026-11-07-sam-assistant-messages-as-pointers.md` (2026-11-09) + +- [ ] In every delivery mode, the tool the agent uses to read the message marks the text as untrusted and names the verified sender as the SAM assistant. The Workers test asserts both in the reader output. +- [ ] The 409 queue fallback no longer records model text with `senderType: 'human'`. +- [ ] Decide with Raphaël whether GitHub-supplied text interpolated into trigger templates + (`renderedPrompt` in `services/github-trigger-queue.ts`, for example PR titles and bodies) must + also become a pointer, and record the decision. He put trigger templates out of scope for the + first Human Voice PR. diff --git a/tasks/backlog/2026-11-09-installer-shared-engine-follow-ups.md b/tasks/backlog/2026-11-09-installer-shared-engine-follow-ups.md new file mode 100644 index 0000000000..025d2c5cfa --- /dev/null +++ b/tasks/backlog/2026-11-09-installer-shared-engine-follow-ups.md @@ -0,0 +1,39 @@ +# Installer: open follow-ups carried from the archived full-installer task + +## Problem + +The user-owned installer shipped in #2475 (merged 2026-11-08). The task file that drove it, +`tasks/archive/2026-10-28-full-installer.md`, still had unchecked items when the 2026-11-09 +weekly reconciliation archived it. This file carries the ones still plausibly open, so they are +not lost in the archive. Nothing here was re-verified in that sweep: check each item against +current `main` before working on it. + +## Context + +- SAM's own production deploy still runs with `use_shared_engine` unset + (`.github/workflows/deploy-reusable.yml`), so every shared-engine step is skipped there. The + "Shared engine / existing CI parity audit (2026-10-28)" section of the archived file lists + what the engine must preserve before CI can switch to it (workflow_call inputs, resource and + state inputs, the Worker config and secret mappings, Docker runner differences, deploy-warning + validation, GitHub-only reporting, and a staging equivalence qualification). +- The archived file's "Adversarial completion audit" section lists four functional gaps: + rejecting older or incompatible releases before update approval; preserving verified canonical + source in the user's account; enforcing the approved workers.dev target on resume and update; + verifying API release identity and web availability before reporting completion. +- #2475's release dependencies were completed with fix #2587 (2026-11-08): production runs in + full mode with a private OAuth client created through `OAUTH_REGISTRATION_TOKEN`, and the daily + release attaches prebuilt artifacts (first: `v2026.11.08.1`). Still open: Raphaël's first real + production install, and promoting the OAuth client to public (manual DNS TXT verification, then + visibility=public, which is permanent). +- Related: `tasks/backlog/2026-11-06-installer-smoke-real-consent-scopes-and-flakes.md`. + +## Acceptance Criteria + +- [ ] Each adversarial-audit gap is confirmed fixed on `main` (cite the code path) or fixed. +- [ ] Prove that an installation's account-owned credentials keep working, and that maintenance + recovery still works, after the hosted installer's OAuth grant is revoked (archived plan item: + "prove child credentials survive central OAuth revocation"). Cite the test or live evidence. +- [ ] Decide whether SAM's own CI should switch to the shared engine. If yes, complete the parity + audit items and qualify equivalence on staging first. If no, record the decision here. +- [ ] After Raphaël's first production install, record the outcome here and decide on promoting + the OAuth client to public.