8d1a568a2b
Co-authored-by: nova28 <17953305+nova28@users.noreply.github.com> Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2.4 KiB
2.4 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 04-skipped-marker-state | Terminal skipped marker state | pending | 4 |
|
plan.md |
|
|
|
Task 04: Terminal skipped marker state
Summary
Add a fourth marker state, skipped, terminal and distinct from both done
and failed, with its reason stored in a new nullable column. Add
SkipStepEntryMarker, which records a skip from an absent, in_progress, or
failed row alike.
In scope
- The
r.migrate.Apply("workflow_step_entry_markers.skip_reason", ...)ALTER. SkipStepEntryMarker(ctx, entryID, position, kind, reason, at)as an upsert on(entry_id, position)settingstate='skipped'andskip_reason, with the update branch guarded byWHERE state <> 'done'.- The seven reason values named by AC-OFFICE-STEP-ENTRY-DISPATCH-004.9.
Out of scope
- The startup scan that writes most skips. Task 06 owns it.
- The allocated position set. This work order claims AC-OFFICE-STEP-ENTRY-DISPATCH-004.9 only for the terminal state and its closed reason list; Task 02 claims the stored set terminality derives from.
- The
adapter_unwiredskip site, which Task 09 owns.
Acceptance
- A skipped position is readable as neither
donenorfailedafter restart. SkipStepEntryMarkersucceeds against an absent row, anin_progressrow, and afailedrow, and does not overwrite adonerow.- The reason values accepted are exactly the seven the criterion lists.
Verification
cd apps/backend && go test ./internal/task/repository/sqlite/...
Files likely touched
apps/backend/internal/task/repository/sqlite/base_migrations.goapps/backend/internal/task/repository/sqlite/step_entries.goapps/backend/internal/task/repository/sqlite/step_entries_test.goapps/backend/internal/task/repository/sqlite/step_entries_postgres_test.go
Dependencies
Task 02, which establishes the migration site and the stored position set the skip is written against.
Risks
CREATE TABLE IF NOT EXISTSdoes not add the column to an existing database, so the ALTER is required rather than optional.
Parallelism
sequential
Inputs
- System design, "Where terminality lives".
- The existing
CompleteStepEntryMarkerimplementation.
Results
Pending.