Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
1b12159
docs(83): capture phase context
SimplicityGuy Jul 9, 2026
90f701e
docs(state): record phase 83 context session
SimplicityGuy Jul 9, 2026
1f148ba
docs(83): research cloud-routing sidecar cutover
SimplicityGuy Jul 9, 2026
4b5843f
docs(phase-83): add validation strategy
SimplicityGuy Jul 9, 2026
4092c19
docs(83): create Cloud-Routing Sidecar Cutover phase plan (6 plans, 3…
SimplicityGuy Jul 9, 2026
8e08c09
docs(83): create phase plan
SimplicityGuy Jul 9, 2026
120846b
docs(83): mark phase execution started
SimplicityGuy Jul 9, 2026
2c20145
feat(83-01): add shared hold_awaiting_cloud() awaiting-cloud writer
SimplicityGuy Jul 9, 2026
32b4444
feat(83-02): add migration 034 repair backfill of missing awaiting cl…
SimplicityGuy Jul 9, 2026
482c3f0
feat(83-03): reap inert awaiting cloud_job row at both analyze-termin…
SimplicityGuy Jul 9, 2026
6865ccd
test(83-02): add idempotent-backfill + empty-autogenerate test for mi…
SimplicityGuy Jul 9, 2026
938a01e
docs(83-02): complete cloud-awaiting repair migration plan
SimplicityGuy Jul 9, 2026
2e78538
docs(83-02): record self-check result in summary
SimplicityGuy Jul 9, 2026
e817796
test(83-03): reaper unit tests (awaiting reaped; SUCCEEDED/RUNNING un…
SimplicityGuy Jul 9, 2026
d5eeb04
docs(83-03): complete D-14 awaiting-row reaper plan
SimplicityGuy Jul 9, 2026
a90830b
docs(83-03): record self-check result
SimplicityGuy Jul 9, 2026
9eb569b
test(83-01): cover hold_awaiting_cloud helper, D-03 IN_FLIGHT exclusi…
SimplicityGuy Jul 9, 2026
1171fce
docs(83-01): complete shared awaiting-cloud writer plan
SimplicityGuy Jul 9, 2026
74e3591
chore: merge executor worktree (worktree-agent-a76e06871f2b36161)
SimplicityGuy Jul 9, 2026
f398c48
chore: merge executor worktree (worktree-agent-afd059f5586178cc5)
SimplicityGuy Jul 9, 2026
4c388b7
chore: merge executor worktree (worktree-agent-a61993d2a09a2096f)
SimplicityGuy Jul 9, 2026
32b3408
docs(phase-83): update tracking after wave 1
SimplicityGuy Jul 9, 2026
d68e6c0
feat(83-05): cut trigger_analysis hold path to hold_awaiting_cloud (D…
SimplicityGuy Jul 9, 2026
9090008
test(83-05): shadow gate green on held-file fixture carrying its awai…
SimplicityGuy Jul 9, 2026
868fe46
test(83-04): add SC#2/D-11/SC#1 CAS clobber + concurrency regressions…
SimplicityGuy Jul 9, 2026
68fd2fa
docs(83-05): complete trigger-analysis hold-path cutover plan
SimplicityGuy Jul 9, 2026
33cd3f3
feat(83-04): CAS-guard report_upload_failed with full no-op + advisor…
SimplicityGuy Jul 9, 2026
5233ded
feat(83-04): swap report_push_mismatch spill CAS onto cloud_job.statu…
SimplicityGuy Jul 9, 2026
ecb8790
feat(83-04): swap report_pushed CAS anchor onto cloud_job.status=='su…
SimplicityGuy Jul 9, 2026
f4a8e90
docs(83-04): complete push/upload callback CAS cutover plan
SimplicityGuy Jul 9, 2026
e385b36
chore: merge executor worktree (worktree-agent-a270587e41881e392)
SimplicityGuy Jul 9, 2026
46d126e
chore: merge executor worktree (worktree-agent-a4052ab3c8e60ff86)
SimplicityGuy Jul 9, 2026
27ba4c2
docs(phase-83): update tracking after wave 2
SimplicityGuy Jul 9, 2026
745cb4b
test(83-06): add SC#3 two-tick double-dispatch HARD GATE (RED)
SimplicityGuy Jul 9, 2026
d00c164
feat(83-06): cut the drain over to the cloud_job sidecar (D-05/D-06/D…
SimplicityGuy Jul 9, 2026
4bedaf0
feat(83-06): re-anchor get_awaiting_cloud_count on the drain clause (…
SimplicityGuy Jul 9, 2026
4c6b401
docs(83-06): log backfill/inflight-clause drain interaction (deferred)
SimplicityGuy Jul 9, 2026
a22e52a
docs(83-06): complete cloud-routing sidecar drain cutover plan
SimplicityGuy Jul 9, 2026
ba8c177
chore: merge executor worktree (worktree-agent-aec960bb6bd5bf6ec)
SimplicityGuy Jul 9, 2026
19f294f
docs(phase-83): update tracking after wave 3
SimplicityGuy Jul 9, 2026
a771524
docs(83): add code review report
SimplicityGuy Jul 9, 2026
20d48dc
docs(83): add phase verification report
SimplicityGuy Jul 9, 2026
68fc6ed
docs(83): plan gap closure for D-02 single awaiting writer (83-07)
SimplicityGuy Jul 9, 2026
a164fac
docs(83): address plan-checker warnings in 83-07 (discriminating grep…
SimplicityGuy Jul 9, 2026
7ae8e14
feat(83-07): extend hold_awaiting_cloud to a CAS-preserving dual-mode…
SimplicityGuy Jul 9, 2026
192e0ab
feat(83-07): route both over-cap spill paths through hold_awaiting_cloud
SimplicityGuy Jul 9, 2026
9e5a520
test(83-07): anti-drift AST guard — hold_awaiting_cloud is the sole a…
SimplicityGuy Jul 9, 2026
31f7b11
docs(83-07): complete single awaiting-writer consolidation plan
SimplicityGuy Jul 9, 2026
4cbbdf2
chore: merge executor worktree (worktree-agent-a0acbabd13f57deb7)
SimplicityGuy Jul 9, 2026
e14d2e9
docs(phase-83): update tracking after gap-closure wave
SimplicityGuy Jul 9, 2026
f6a969e
test(83-07): harden anti-drift guard against **splat awaiting writes
SimplicityGuy Jul 9, 2026
381b5bf
docs(83): add 83-07 gap-closure code review report
SimplicityGuy Jul 9, 2026
74ff255
docs(phase-83): complete phase execution
SimplicityGuy Jul 9, 2026
fbb8b59
docs(83): ship phase 83 — PR #227
SimplicityGuy Jul 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .planning/REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

### Sidecar Migration (SIDECAR)

- [ ] **SIDECAR-01**: Cloud-routing status (`AWAITING_CLOUD`/`PUSHING`/`PUSHED`/`LOCAL_ANALYZING`) is represented via the `cloud_job` sidecar (and/or derived `in_flight(analyze)`), with the CAS-guard behavior of `/pushed`, `/mismatch`, and `/upload-failed` preserved or strengthened (closes the missing-CAS-guard bug at `agent_s3.py:195`).
- [x] **SIDECAR-01**: Cloud-routing status (`AWAITING_CLOUD`/`PUSHING`/`PUSHED`/`LOCAL_ANALYZING`) is represented via the `cloud_job` sidecar (and/or derived `in_flight(analyze)`), with the CAS-guard behavior of `/pushed`, `/mismatch`, and `/upload-failed` preserved or strengthened (closes the missing-CAS-guard bug at `agent_s3.py:195`).
- [ ] **SIDECAR-02**: Dedup resolution (`DUPLICATE_RESOLVED`) is represented via a durable dedup marker, with resolve/undo preserved and backfilled from existing rows.
- [ ] **SIDECAR-03**: Review decisions (approve/reject) and apply outcomes are read from `proposals.status` + `execution_log` — `FileRecord.state` is no longer a redundant, drift-prone mirror of proposal state (fixes the `store_proposals` MOVED-regression bug).

Expand Down Expand Up @@ -146,7 +146,7 @@
| READ-03 | Phase 80 | Pending |
| READ-04 | Phase 84 | Pending |
| READ-05 | Phase 85 | Pending |
| SIDECAR-01 | Phase 83 | Pending |
| SIDECAR-01 | Phase 83 | Complete |
| SIDECAR-02 | Phase 84 | Pending |
| SIDECAR-03 | Phase 86 | Pending |
| UI-01 | Phase 87 | Pending |
Expand Down
26 changes: 23 additions & 3 deletions .planning/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Retire the linear `FileState` enum and derive per-file, per-stage status (`not_s
- [ ] **Phase 80: Recovery / Re-enqueue Cutover** — `reenqueue.py` + `reconcile_cloud_jobs.py` derive done/in-flight from `stage_status`/sidecars with no `FileRecord.state` read; deliberately **before** the pending-set/counts readers (double-negation dependency) (READ-03)
- [x] **Phase 81: Per-Stage Failure Persistence & Retry Paths** — durable failure markers for analyze + metadata (`report_metadata_failed` records instead of nothing) + reused fingerprint failure; a metadata retry path so a failure is never a permanent dead-end (FAIL-01..04) (completed 2026-07-09)
- [ ] **Phase 82: Counts & Pending-Set Cutover** — the three enrich pending sets + `get_pipeline_stats` derived from `stage_status`; the cross-stage deadlock dissolves; four-bucket per-stage counts; the 200K-scale poll latency measured (READ-01, READ-02, PERF-02)
- [ ] **Phase 83: Cloud-Routing Sidecar Cutover** — cloud routing (`AWAITING_CLOUD`/`PUSHING`/`PUSHED`/`LOCAL_ANALYZING`) via the `cloud_job` sidecar / derived `in_flight(analyze)`, one atomic consistency domain, CAS-guard collapse (closes the missing `/upload-failed` guard) (SIDECAR-01)
- [x] **Phase 83: Cloud-Routing Sidecar Cutover** — cloud routing (`AWAITING_CLOUD`/`PUSHING`/`PUSHED`/`LOCAL_ANALYZING`) via the `cloud_job` sidecar / derived `in_flight(analyze)`, one atomic consistency domain, CAS-guard collapse (closes the missing `/upload-failed` guard) (SIDECAR-01) (completed 2026-07-09)
- [ ] **Phase 84: Dedup & Fingerprint-Progress Cutover** — `services/dedup.py` + `get_fingerprint_progress` derive from the dedup marker / output tables; resolve/undo preserved (READ-04, SIDECAR-02)
- [ ] **Phase 85: EXECUTED-Gate Revival** — the dead `state == EXECUTED` gates revived against the real apply-outcome (`applied(f)` predicate); turns tag/CUE writing on for the first time — **own PR, live-UAT-worthy, not bundled** (READ-05)
- [ ] **Phase 86: Proposals Cutover** — `proposals.status` becomes the sole authority; the redundant `FileRecord.state` cascade (`_TERMINAL_FILE_STATES`) deleted, dissolving the `store_proposals` MOVED-regression bug (SIDECAR-03)
Expand Down Expand Up @@ -271,7 +271,7 @@ Deployment-gated verification deferred to the live OCI A1 rollout (see STATE.md
| 80. Recovery / Re-enqueue Cutover | 2026.7.5 | 0/0 | Not started | - |
| 81. Per-Stage Failure Persistence & Retry Paths | 2026.7.5 | 6/6 | Complete | 2026-07-09 |
| 82. Counts & Pending-Set Cutover | 2026.7.5 | 0/0 | Not started | - |
| 83. Cloud-Routing Sidecar Cutover | 2026.7.5 | 0/0 | Not started | - |
| 83. Cloud-Routing Sidecar Cutover | 2026.7.5 | 7/7 | Complete | 2026-07-09 |
| 84. Dedup & Fingerprint-Progress Cutover | 2026.7.5 | 0/0 | Not started | - |
| 85. EXECUTED-Gate Revival | 2026.7.5 | 0/0 | Not started | - |
| 86. Proposals Cutover | 2026.7.5 | 0/0 | Not started | - |
Expand Down Expand Up @@ -408,7 +408,27 @@ Plans:
2. `report_upload_failed` gains a CAS guard so a late/duplicate reporter can no longer clobber an already-advanced file (closes the `agent_s3.py:195` bug), proven by a regression test.
3. The shadow-compare gate stays green and no double-dispatch / re-pick window is introduced (integration test).

**Plans**: TBD
**Plans**: 7 plans in 4 waves (1 gap-closure)
Plans:
**Wave 1**

- [x] 83-01-PLAN.md — Shared `hold_awaiting_cloud()` writer helper (D-00a/b/c, D-01, D-02, D-03, D-13)
- [x] 83-02-PLAN.md — Corpus-repair migration `034` + idempotent-backfill test (D-04)
- [x] 83-03-PLAN.md — D-14 inert awaiting-row reaper at the two analyze-terminal seams

**Wave 2** *(blocked on Wave 1 completion)*

- [x] 83-04-PLAN.md — Callback CAS collapse: `report_upload_failed` + `report_push_mismatch` (D-09/D-10/D-11/D-12/D-03, SC#2)
- [x] 83-05-PLAN.md — Go-forward hold-path cutover + shadow-gate green (D-01, D-00d)

**Wave 3** *(blocked on Wave 2 completion)*

- [x] 83-06-PLAN.md — Drain-candidate reader cutover + count card + staleness clock + SC#3 HARD GATE (D-05/D-06/D-07/D-15)

**Wave 4** *(gap closure — verification found 6/7 must-haves; closes the failed D-02 single-writer must-have / WR-03)*

- [x] 83-07-PLAN.md — Consolidate the three awaiting writers into one CAS-preserving `hold_awaiting_cloud` + anti-drift source test (D-02, D-03, D-09/D-10/D-11/D-12)

**Scope exclusion**: `tasks/reconcile_cloud_jobs.py` is owned by **Phase 80** (80-CONTEXT D-04) — its at-cap spill-back write is retired there, not here. This phase covers the sibling cloud-routing writers (`routers/agent_push.py`, `routers/pipeline.py`, `routers/agent_s3.py`) and the drain-candidate / dispatch reads.
**Note (deps)**: Rewired off Phase 82 to break the `80 → 83 → 82 → 80` cycle. Phase 83 shares no requirement with 82 (pending sets / `get_pipeline_stats`); it needs the derivation layer (78), the shadow-compare gate (79), and the analyze failure marker (81) that `LOCAL_ANALYZING`-from-`in_flight(analyze)` and push-done-via-analyze-terminal both read. Because this phase now runs BEFORE 82 (the milestone thesis), its drain-re-pick hazard lands earlier — the integration test below is a hard gate, not a recommendation.
**Note**: Flagged for phase-level research at plan-time — the `AWAITING_CLOUD`/`PUSHED` drain-re-pick hazard is the sharpest new-regression risk in the milestone (recommend a live/integration test before committing the drain-candidate query).
Expand Down
29 changes: 15 additions & 14 deletions .planning/STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
gsd_state_version: 1.0
milestone: 2026.7.5
milestone_name: Parallel Enrich DAG
status: "Phase 81 shipped — PR #226"
last_updated: "2026-07-09T17:06:36.674Z"
last_activity: 2026-07-09
status: ready_to_plan
last_updated: "2026-07-10T00:03:11.000Z"
last_activity: 2026-07-09 -- Phase 83 shipped (PR #227)
progress:
total_phases: 52
completed_phases: 18
total_plans: 69
completed_plans: 13
percent: 35
completed_phases: 19
total_plans: 76
completed_plans: 20
percent: 37
stopped_at: Phase 83 shipped as PR #227 (verified 7/7) — ready to discuss Phase 84
---

# Project State
Expand All @@ -20,20 +21,20 @@ progress:
See: .planning/PROJECT.md (updated 2026-07-06 — 2026.7.2 Multi-Compute Agents shipped)

**Core value:** Get 200K messy music and concert files properly named, organized, deduplicated, with rich metadata in Postgres -- human-in-the-loop approval so nothing moves without review. Files stay on file-server agents; decisions stay on the application server.
**Current focus:** Phase 82counts & pending set cutover
**Current focus:** Phase 84dedup & fingerprint progress cutover

## Current Position

Phase: 82
Phase: 84
Plan: Not started
Status: Phase 81 shipped — PR #226
Status: Ready to plan (Phase 83 shipped — PR #227, awaiting CI + merge)
Last activity: 2026-07-09

## Performance Metrics

**v1.0 Velocity:**

- Total plans completed: 187
- Total plans completed: 194
- Total phases: 11
- Timeline: 4 days (2026-03-27 -> 2026-03-30)
- Tests: 282 passing
Expand Down Expand Up @@ -289,9 +290,9 @@ These are tracked follow-ups; none blocks the 2026.7.1 milestone record. The PRO

## Session Continuity

Last session: 2026-07-09T05:35:10.902Z
Stopped at: Completed 81-02-PLAN.md
Resume file: None
Last session: 2026-07-09T18:50:41.889Z
Stopped at: Phase 83 context gathered
Resume file: .planning/phases/83-cloud-routing-sidecar-cutover/83-CONTEXT.md

## Operator Next Steps

Expand Down
Loading
Loading