dorfl 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advance-ci-template.d.ts +3 -3
- package/dist/advance-ci-template.js +1 -1
- package/dist/advance-ci-template.js.map +1 -1
- package/dist/advance-classify.d.ts +5 -5
- package/dist/advance-classify.d.ts.map +1 -1
- package/dist/advance-classify.js +4 -4
- package/dist/advance-drivers.d.ts +7 -7
- package/dist/advance-drivers.d.ts.map +1 -1
- package/dist/advance-drivers.js +5 -5
- package/dist/advance-drivers.js.map +1 -1
- package/dist/advance-isolated.d.ts +3 -3
- package/dist/advance-isolated.d.ts.map +1 -1
- package/dist/advance-isolated.js +1 -1
- package/dist/advance-lifecycle-template.d.ts +2 -2
- package/dist/advance-lifecycle-template.js +9 -9
- package/dist/advance-lifecycle-template.js.map +1 -1
- package/dist/advance-loop-driver.d.ts +3 -3
- package/dist/advance-loop-driver.d.ts.map +1 -1
- package/dist/advance-loop-driver.js +1 -1
- package/dist/advance-treeless-publish.d.ts +1 -1
- package/dist/advance.d.ts +11 -11
- package/dist/advance.d.ts.map +1 -1
- package/dist/advance.js +21 -21
- package/dist/advance.js.map +1 -1
- package/dist/advancing-lock.d.ts +1 -1
- package/dist/advancing-lock.js +5 -5
- package/dist/apply-decide.d.ts +2 -2
- package/dist/apply-decide.js +2 -2
- package/dist/apply-merge-action.d.ts +4 -4
- package/dist/apply-merge-action.js +2 -2
- package/dist/apply-persist.d.ts +5 -5
- package/dist/apply-persist.d.ts.map +1 -1
- package/dist/apply-persist.js +7 -7
- package/dist/apply-persist.js.map +1 -1
- package/dist/buildable-body.d.ts +14 -14
- package/dist/buildable-body.js +9 -9
- package/dist/claim-cas.d.ts +3 -3
- package/dist/claim-cas.js +1 -1
- package/dist/claim-cas.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +83 -77
- package/dist/cli.js.map +1 -1
- package/dist/close-job-template.d.ts +3 -3
- package/dist/close-job-template.js +8 -8
- package/dist/close-job.d.ts +8 -8
- package/dist/close-job.js +25 -25
- package/dist/close-job.js.map +1 -1
- package/dist/complete.d.ts +3 -3
- package/dist/complete.js +8 -8
- package/dist/complete.js.map +1 -1
- package/dist/concurrency.d.ts +1 -1
- package/dist/concurrency.js +1 -1
- package/dist/config.d.ts +32 -32
- package/dist/config.js +5 -5
- package/dist/config.js.map +1 -1
- package/dist/continue-branch.d.ts +1 -1
- package/dist/continue-branch.js +1 -1
- package/dist/cwd-section.js +1 -1
- package/dist/cwd-section.js.map +1 -1
- package/dist/decision-engine.d.ts +2 -2
- package/dist/do-autopick.d.ts +6 -6
- package/dist/do-autopick.d.ts.map +1 -1
- package/dist/do-autopick.js +5 -5
- package/dist/do-autopick.js.map +1 -1
- package/dist/do-config.d.ts +3 -3
- package/dist/do-config.js +3 -3
- package/dist/do-config.js.map +1 -1
- package/dist/do-remote-auto.d.ts +2 -2
- package/dist/do-remote-auto.js +1 -1
- package/dist/do.d.ts +25 -25
- package/dist/do.d.ts.map +1 -1
- package/dist/do.js +22 -22
- package/dist/do.js.map +1 -1
- package/dist/drop-source.d.ts +2 -2
- package/dist/env-config.js +8 -8
- package/dist/env-config.js.map +1 -1
- package/dist/format.js +3 -3
- package/dist/format.js.map +1 -1
- package/dist/frontmatter.d.ts +33 -39
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +18 -31
- package/dist/frontmatter.js.map +1 -1
- package/dist/install-ci-branch-protection.d.ts +1 -1
- package/dist/install-ci-branch-protection.js +1 -1
- package/dist/install-ci-capabilities/advance-lifecycle.d.ts +1 -1
- package/dist/install-ci-capabilities/advance-lifecycle.js +1 -1
- package/dist/install-ci-capabilities/close-job.d.ts +1 -1
- package/dist/install-ci-capabilities/close-job.js +1 -1
- package/dist/install-ci-capabilities/example-noop.d.ts +1 -1
- package/dist/install-ci-capabilities/example-noop.js +1 -1
- package/dist/install-ci-capabilities/intake.d.ts +2 -2
- package/dist/install-ci-capabilities/intake.js +2 -2
- package/dist/install-ci-capabilities/verify.d.ts +1 -1
- package/dist/install-ci-capabilities/verify.js +1 -1
- package/dist/install-ci-core.d.ts +3 -3
- package/dist/install-ci-core.js +2 -2
- package/dist/install-ci-core.js.map +1 -1
- package/dist/install-ci-github.d.ts +1 -1
- package/dist/install-ci-github.js +1 -1
- package/dist/install-ci.d.ts +1 -1
- package/dist/install-ci.js +4 -4
- package/dist/install-ci.js.map +1 -1
- package/dist/intake-event.d.ts +6 -6
- package/dist/intake-event.js +6 -6
- package/dist/intake-marker.d.ts +3 -3
- package/dist/intake-marker.d.ts.map +1 -1
- package/dist/intake-triage.d.ts +1 -1
- package/dist/intake-triage.js +2 -2
- package/dist/intake-trigger-template.d.ts +8 -8
- package/dist/intake-trigger-template.d.ts.map +1 -1
- package/dist/intake-trigger-template.js +16 -16
- package/dist/intake-trigger-template.js.map +1 -1
- package/dist/intake.d.ts +50 -50
- package/dist/intake.d.ts.map +1 -1
- package/dist/intake.js +70 -70
- package/dist/intake.js.map +1 -1
- package/dist/integration-core.d.ts +17 -17
- package/dist/integration-core.js +17 -17
- package/dist/integration-core.js.map +1 -1
- package/dist/isolation.d.ts +3 -3
- package/dist/issue-provider.d.ts +4 -4
- package/dist/issue-provider.js +1 -1
- package/dist/item-lock.d.ts +21 -21
- package/dist/item-lock.d.ts.map +1 -1
- package/dist/item-lock.js +16 -16
- package/dist/item-path.d.ts +2 -2
- package/dist/item-path.js +2 -2
- package/dist/ledger-lint.d.ts +9 -9
- package/dist/ledger-lint.js +9 -9
- package/dist/ledger-read.d.ts +57 -57
- package/dist/ledger-read.d.ts.map +1 -1
- package/dist/ledger-read.js +24 -24
- package/dist/ledger-read.js.map +1 -1
- package/dist/ledger-write.d.ts +2 -2
- package/dist/ledger-write.js +1 -1
- package/dist/lifecycle-gather.d.ts +1 -1
- package/dist/lifecycle-gather.js +16 -16
- package/dist/lifecycle-gather.js.map +1 -1
- package/dist/lifecycle-pools.d.ts +4 -4
- package/dist/lifecycle-pools.js +1 -1
- package/dist/merge-question-surfacer.d.ts +3 -3
- package/dist/merge-question-surfacer.js +2 -2
- package/dist/merge-question-surfacer.js.map +1 -1
- package/dist/mint-adr.js +4 -4
- package/dist/mirror-pool-scan.d.ts +2 -2
- package/dist/mirror-pool-scan.js +3 -3
- package/dist/mirror-pool-scan.js.map +1 -1
- package/dist/needs-attention.d.ts +13 -13
- package/dist/needs-attention.d.ts.map +1 -1
- package/dist/needs-attention.js +11 -11
- package/dist/needs-attention.js.map +1 -1
- package/dist/orphan-sidecar.d.ts +2 -2
- package/dist/placement.d.ts +6 -6
- package/dist/placement.js +2 -2
- package/dist/prd-to-spec.d.ts +15 -1
- package/dist/prd-to-spec.d.ts.map +1 -1
- package/dist/prd-to-spec.js +36 -14
- package/dist/prd-to-spec.js.map +1 -1
- package/dist/prompt.d.ts +24 -24
- package/dist/prompt.d.ts.map +1 -1
- package/dist/prompt.js +29 -31
- package/dist/prompt.js.map +1 -1
- package/dist/protocol/CLAIM-PROTOCOL.md +4 -4
- package/dist/protocol/REVIEW-PROTOCOL.md +1 -1
- package/dist/protocol/TASKING-PROTOCOL.md +12 -12
- package/dist/protocol/WORK-CONTRACT.md +39 -39
- package/dist/protocol/spec-template.md +1 -1
- package/dist/protocol/task-template.md +3 -3
- package/dist/readiness.d.ts +1 -1
- package/dist/recover-isolated.js +1 -1
- package/dist/repo-config.js +12 -12
- package/dist/repo-config.js.map +1 -1
- package/dist/review-gate.d.ts +3 -3
- package/dist/review-gate.d.ts.map +1 -1
- package/dist/review-gate.js +11 -10
- package/dist/review-gate.js.map +1 -1
- package/dist/review-verdict.d.ts +2 -2
- package/dist/review-verdict.d.ts.map +1 -1
- package/dist/review-verdict.js +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.js +5 -5
- package/dist/run.js.map +1 -1
- package/dist/scan.d.ts +10 -10
- package/dist/scan.d.ts.map +1 -1
- package/dist/scan.js +8 -8
- package/dist/scan.js.map +1 -1
- package/dist/select-order.d.ts +1 -1
- package/dist/select-priority.d.ts +12 -12
- package/dist/select-priority.d.ts.map +1 -1
- package/dist/select-priority.js +5 -5
- package/dist/select-priority.js.map +1 -1
- package/dist/sidecar.d.ts +2 -2
- package/dist/sidecar.js +2 -2
- package/dist/sidecar.js.map +1 -1
- package/dist/slug-namespace.d.ts +1 -1
- package/dist/slug-namespace.js +3 -3
- package/dist/slug-namespace.js.map +1 -1
- package/dist/spec-complete.js +2 -2
- package/dist/spec-complete.js.map +1 -1
- package/dist/start.d.ts +1 -1
- package/dist/start.js +3 -3
- package/dist/start.js.map +1 -1
- package/dist/status.d.ts +3 -3
- package/dist/status.js +4 -4
- package/dist/status.js.map +1 -1
- package/dist/surface-gate.d.ts +2 -2
- package/dist/surface-gate.d.ts.map +1 -1
- package/dist/surface-persist.d.ts +2 -2
- package/dist/surface-persist.d.ts.map +1 -1
- package/dist/tasker-review-loop.d.ts +8 -8
- package/dist/tasker-review-loop.d.ts.map +1 -1
- package/dist/tasker-review-loop.js +8 -8
- package/dist/tasker-review-loop.js.map +1 -1
- package/dist/tasking-eligibility.d.ts +21 -21
- package/dist/tasking-eligibility.d.ts.map +1 -1
- package/dist/tasking-eligibility.js +10 -10
- package/dist/tasking-lock.d.ts +8 -8
- package/dist/tasking-lock.d.ts.map +1 -1
- package/dist/tasking-lock.js +20 -21
- package/dist/tasking-lock.js.map +1 -1
- package/dist/tasking.d.ts +33 -33
- package/dist/tasking.d.ts.map +1 -1
- package/dist/tasking.js +89 -88
- package/dist/tasking.js.map +1 -1
- package/dist/triage-gate.d.ts +1 -1
- package/dist/triage-persist.d.ts +5 -5
- package/dist/triage-persist.js +15 -15
- package/dist/triage-persist.js.map +1 -1
- package/dist/verify-workflow-template.d.ts +1 -1
- package/dist/verify-workflow-template.js +2 -2
- package/dist/work-layout.d.ts +9 -7
- package/dist/work-layout.d.ts.map +1 -1
- package/dist/work-layout.js +9 -7
- package/dist/work-layout.js.map +1 -1
- package/dist/workspace.d.ts +1 -1
- package/package.json +1 -1
- package/src/advance-ci-template.ts +4 -4
- package/src/advance-classify.ts +5 -5
- package/src/advance-drivers.ts +10 -10
- package/src/advance-isolated.ts +3 -3
- package/src/advance-lifecycle-template.ts +9 -9
- package/src/advance-loop-driver.ts +3 -3
- package/src/advance-treeless-publish.ts +1 -1
- package/src/advance.ts +30 -30
- package/src/advancing-lock.ts +6 -6
- package/src/apply-decide.ts +2 -2
- package/src/apply-merge-action.ts +5 -5
- package/src/apply-persist.ts +8 -8
- package/src/buildable-body.ts +14 -14
- package/src/claim-cas.ts +4 -4
- package/src/cli.ts +94 -84
- package/src/close-job-template.ts +8 -8
- package/src/close-job.ts +26 -26
- package/src/complete.ts +11 -11
- package/src/concurrency.ts +1 -1
- package/src/config.ts +37 -37
- package/src/continue-branch.ts +1 -1
- package/src/cwd-section.ts +1 -1
- package/src/decision-engine.ts +3 -3
- package/src/do-autopick.ts +9 -9
- package/src/do-config.ts +6 -6
- package/src/do-remote-auto.ts +2 -2
- package/src/do.ts +49 -49
- package/src/drop-source.ts +2 -2
- package/src/env-config.ts +8 -8
- package/src/format.ts +3 -3
- package/src/frontmatter.ts +42 -60
- package/src/install-ci-branch-protection.ts +1 -1
- package/src/install-ci-capabilities/advance-lifecycle.ts +1 -1
- package/src/install-ci-capabilities/close-job.ts +1 -1
- package/src/install-ci-capabilities/example-noop.ts +1 -1
- package/src/install-ci-capabilities/intake.ts +2 -2
- package/src/install-ci-capabilities/verify.ts +1 -1
- package/src/install-ci-core.ts +4 -4
- package/src/install-ci-github.ts +1 -1
- package/src/install-ci.ts +4 -4
- package/src/intake-event.ts +6 -6
- package/src/intake-marker.ts +3 -3
- package/src/intake-triage.ts +2 -2
- package/src/intake-trigger-template.ts +17 -17
- package/src/intake.ts +97 -97
- package/src/integration-core.ts +35 -35
- package/src/isolation.ts +3 -3
- package/src/issue-provider.ts +4 -4
- package/src/item-lock.ts +21 -21
- package/src/item-path.ts +2 -2
- package/src/ledger-lint.ts +9 -9
- package/src/ledger-read.ts +81 -81
- package/src/ledger-write.ts +3 -3
- package/src/lifecycle-gather.ts +16 -16
- package/src/lifecycle-pools.ts +4 -4
- package/src/merge-question-surfacer.ts +4 -4
- package/src/mint-adr.ts +4 -4
- package/src/mirror-pool-scan.ts +5 -5
- package/src/needs-attention.ts +22 -22
- package/src/orphan-sidecar.ts +2 -2
- package/src/placement.ts +6 -6
- package/src/prd-to-spec.ts +51 -15
- package/src/prompt.ts +33 -35
- package/src/readiness.ts +1 -1
- package/src/recover-isolated.ts +1 -1
- package/src/repo-config.ts +12 -12
- package/src/review-gate.ts +12 -11
- package/src/review-verdict.ts +2 -2
- package/src/run.ts +6 -6
- package/src/scan.ts +15 -15
- package/src/select-order.ts +1 -1
- package/src/select-priority.ts +13 -13
- package/src/sidecar.ts +3 -3
- package/src/slug-namespace.ts +3 -3
- package/src/spec-complete.ts +2 -2
- package/src/start.ts +4 -4
- package/src/status.ts +7 -7
- package/src/surface-gate.ts +2 -2
- package/src/surface-persist.ts +2 -2
- package/src/tasker-review-loop.ts +15 -15
- package/src/tasking-eligibility.ts +21 -21
- package/src/tasking-lock.ts +27 -28
- package/src/tasking.ts +124 -123
- package/src/triage-gate.ts +1 -1
- package/src/triage-persist.ts +16 -16
- package/src/verify-workflow-template.ts +2 -2
- package/src/work-layout.ts +9 -7
- package/src/workspace.ts +1 -1
package/src/integration-core.ts
CHANGED
|
@@ -57,8 +57,8 @@ import {isAncestor} from './gc.js';
|
|
|
57
57
|
* integrates), so verify-then-review holds on the merged tree, never split across
|
|
58
58
|
* two trees. Any failure routes to needs-attention.
|
|
59
59
|
*
|
|
60
|
-
* It is the CORE in the head / core / tail decomposition (
|
|
61
|
-
* `work/
|
|
60
|
+
* It is the CORE in the head / core / tail decomposition (spec
|
|
61
|
+
* `work/specs/tasked/run-do-integrate-convergence.md`): the caller-specific HEAD
|
|
62
62
|
* (repo/arbiter/branch checks, source resolution, the `recovering` flag) and TAIL
|
|
63
63
|
* (switch-to-main / `syncLocalMain` / delete-local-branch / `--no-switch` / the
|
|
64
64
|
* propose next-step block, or — for `run` — the job-record + worktree reap) stay
|
|
@@ -98,7 +98,7 @@ export type IntegrationCoreOutcome =
|
|
|
98
98
|
/**
|
|
99
99
|
* The CORE's input — everything the band needs, nothing caller-shaped. Every
|
|
100
100
|
* divergence between the human `complete` path and the autonomous `do`/`run` path
|
|
101
|
-
* maps to a FIELD VALUE here, not an `if (caller === …)` branch (
|
|
101
|
+
* maps to a FIELD VALUE here, not an `if (caller === …)` branch (spec: "zero
|
|
102
102
|
* caller-identity leakage"). In-place vs worktree = `cwd`; arbiter name =
|
|
103
103
|
* `arbiter`; human vs autonomous surfacing = `surfaceArbiter`; do's recovery =
|
|
104
104
|
* `source` + `recovering`; per-repo/lang gate = `verify`.
|
|
@@ -108,9 +108,9 @@ export type IntegrationCoreOutcome =
|
|
|
108
108
|
* task-shaped done-move + title source. The shared band
|
|
109
109
|
* (verify→review→commit→rebase→integrate→propose-PR-with-title/body) is
|
|
110
110
|
* IDENTICAL; only the "which item move + which file to read the title from" step
|
|
111
|
-
* is caller-supplied. This is the seam the `do
|
|
112
|
-
* rides (task `slice-output-through-integration`): its "item move" is the
|
|
113
|
-
* LIFECYCLE move (`work/
|
|
111
|
+
* is caller-supplied. This is the seam the `do spec:<slug>` TASKING transition
|
|
112
|
+
* rides (task `slice-output-through-integration`): its "item move" is the spec
|
|
113
|
+
* LIFECYCLE move (`work/specs/ready/<slug>.md → work/specs/tasked/<slug>.md`, residence =
|
|
114
114
|
* tasked-ness) plus its EMITTED backlog files — NOT a task done-move. Supplying it
|
|
115
115
|
* makes every integrate-time arg (`--propose`/`--merge`, provider, title/body)
|
|
116
116
|
* apply to tasking BY CONSTRUCTION, because they resolve ONCE here.
|
|
@@ -127,7 +127,7 @@ export interface IntegrationLifecycle {
|
|
|
127
127
|
/**
|
|
128
128
|
* Absolute path to the item file whose `title:` frontmatter seeds the default
|
|
129
129
|
* commit summary AND the synthesised propose-mode PR title. For the tasking
|
|
130
|
-
* transition this is the held
|
|
130
|
+
* transition this is the held spec (`work/specs/ready/<slug>.md`) — read BEFORE
|
|
131
131
|
* {@link stage} moves it. IGNORED when {@link title} is supplied (the explicit
|
|
132
132
|
* title wins — no file read).
|
|
133
133
|
*/
|
|
@@ -137,16 +137,16 @@ export interface IntegrationLifecycle {
|
|
|
137
137
|
* uses THIS as the title source for the default commit summary AND the synthesised
|
|
138
138
|
* propose-mode PR title, INSTEAD of reading {@link titlePath}. This is the seam for
|
|
139
139
|
* a lifecycle whose output file does NOT yet exist at title-read time — the intake
|
|
140
|
-
* lone-task /
|
|
140
|
+
* lone-task / spec path WRITES `work/backlog/<slug>.md` / `work/specs/ready/<slug>.md` in
|
|
141
141
|
* {@link stage}, which runs AFTER the title read, so a `titlePath` read would race
|
|
142
|
-
* the write and fall back to a generic subject. The `do
|
|
143
|
-
* leaves this unset (its `titlePath` is an already-existing held
|
|
142
|
+
* the write and fall back to a generic subject. The `do spec:` tasking transition
|
|
143
|
+
* leaves this unset (its `titlePath` is an already-existing held spec, read fine).
|
|
144
144
|
*/
|
|
145
145
|
title?: string;
|
|
146
146
|
/**
|
|
147
147
|
* STAGE the lifecycle move + emitted files into the index on the current work
|
|
148
148
|
* branch (runner-owned git; the agent never does git). For the tasking
|
|
149
|
-
* transition: `git mv work/
|
|
149
|
+
* transition: `git mv work/specs/ready/<slug>.md → work/specs/tasked/<slug>.md`
|
|
150
150
|
* (residence = tasked-ness; no marker), and write+`git add` the produced
|
|
151
151
|
* `work/backlog/*.md` files. The band's subsequent `git add -A` + atomic commit
|
|
152
152
|
* folds this staging
|
|
@@ -165,8 +165,8 @@ export interface IntegrationLifecycle {
|
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
167
|
* The default LIVENESS CEILING for the merge-mode `${branch}:main` push (the
|
|
168
|
-
* durable promotions `tasks/ready → tasks/done` and, via `lifecycle`, `
|
|
169
|
-
* →
|
|
168
|
+
* durable promotions `tasks/ready → tasks/done` and, via `lifecycle`, `specs/ready
|
|
169
|
+
* → specs/tasked`). Task `c2-rebase-until-real-on-durable-main-promotions` turned
|
|
170
170
|
* the previous SMALL FIXED CAP (was 5, the `run-fleet-claim-integrate-and-sibling-
|
|
171
171
|
* rebase-concurrency-safe` Race-1 budget) into rebase-until-real-conflict: a CLEAN
|
|
172
172
|
* re-rebase no longer counts against a tiny give-up budget — only a GENUINE
|
|
@@ -271,7 +271,7 @@ export interface IntegrationCoreInput {
|
|
|
271
271
|
* `work/<type>-<slug>` identity. When omitted, the core derives it from the
|
|
272
272
|
* branch HEAD is on (the robust default — the type is encoded IN the name). A
|
|
273
273
|
* caller that knows the type explicitly may pass it (e.g. the tasking path
|
|
274
|
-
* passes its `work/
|
|
274
|
+
* passes its `work/specs/ready-<slug>`).
|
|
275
275
|
*/
|
|
276
276
|
branch?: string;
|
|
277
277
|
/**
|
|
@@ -279,7 +279,7 @@ export interface IntegrationCoreInput {
|
|
|
279
279
|
* freshly-built path — since claim no longer moves the body, a freshly-built
|
|
280
280
|
* task RESTS in the pool on `main`, task
|
|
281
281
|
* `cutover-claim-body-stays-and-complete-sources-from-backlog`),
|
|
282
|
-
* `tasks-backlog` (the `--allow-backlog` staged-drive path,
|
|
282
|
+
* `tasks-backlog` (the `--allow-backlog` staged-drive path, spec
|
|
283
283
|
* `do-allow-backlog-drive-staged-tasks-without-promotion`: a human drove a
|
|
284
284
|
* STAGED task in place, so the done-move goes `tasks/backlog/ → tasks/done/`
|
|
285
285
|
* DIRECTLY — the explicit drive IS the promotion, never bouncing through the
|
|
@@ -325,7 +325,7 @@ export interface IntegrationCoreInput {
|
|
|
325
325
|
*/
|
|
326
326
|
recovering: boolean;
|
|
327
327
|
/**
|
|
328
|
-
* **RECOVER an already-committed, already-done-moved STRANDED branch** (
|
|
328
|
+
* **RECOVER an already-committed, already-done-moved STRANDED branch** (spec
|
|
329
329
|
* `ledger-integrity` story 6, the `finish-already-committed-branch` task). When
|
|
330
330
|
* `true`, the work is ALREADY committed on the work branch with the task already
|
|
331
331
|
* `git mv`'d into `work/done/` (a terminal push failed AFTER steps 2–3, leaving
|
|
@@ -564,7 +564,7 @@ export interface IntegrationCoreInput {
|
|
|
564
564
|
* `slice-output-through-integration`). When set, the band reads the title from
|
|
565
565
|
* its {@link IntegrationLifecycle.titlePath}, calls its
|
|
566
566
|
* {@link IntegrationLifecycle.stage} INSTEAD of the task `git mv → work/done/`,
|
|
567
|
-
* and uses the plain rebase ({@link recovering} is irrelevant). The `do
|
|
567
|
+
* and uses the plain rebase ({@link recovering} is irrelevant). The `do spec:`
|
|
568
568
|
* TASKING transition supplies it; `do`/`complete`/`run` leave it unset (the
|
|
569
569
|
* task done-move is unchanged).
|
|
570
570
|
*/
|
|
@@ -606,8 +606,8 @@ export interface IntegrationCoreResult {
|
|
|
606
606
|
* needs-attention routing can record the findings as the item-body prose. The
|
|
607
607
|
* tasking path (task `slice-acceptance-gate`) reads this: the core's build
|
|
608
608
|
* `applyNeedsAttentionTransition` is keyed on a TASK lock, so the tasking path
|
|
609
|
-
* routes the
|
|
610
|
-
* `
|
|
609
|
+
* routes the spec itself via the lock release's needs-attention redirect (amend the
|
|
610
|
+
* `spec:<slug>` unified lock `active -> stuck`, no folder move), using THIS
|
|
611
611
|
* findings text as the body. Absent on every non-`review-blocked` outcome. (The
|
|
612
612
|
* build path ignores it — its routing already records the findings in-body.)
|
|
613
613
|
*/
|
|
@@ -667,7 +667,7 @@ export async function performIntegration(
|
|
|
667
667
|
// in the `run` caller, not here.
|
|
668
668
|
const freshWorktreeGate = input.freshWorktreeGate === true;
|
|
669
669
|
|
|
670
|
-
// RECOVER an already-committed, already-done-moved STRANDED branch (
|
|
670
|
+
// RECOVER an already-committed, already-done-moved STRANDED branch (spec
|
|
671
671
|
// `ledger-integrity` story 6). The work + the done-move are ALREADY committed on
|
|
672
672
|
// the work branch (a terminal push failed AFTER steps 2–3); SKIP steps 0–3
|
|
673
673
|
// (prepare / gate / review / done-move / commit) and run ONLY the
|
|
@@ -688,7 +688,7 @@ export async function performIntegration(
|
|
|
688
688
|
recoveryRebaseSleep: input.recoveryRebaseSleep,
|
|
689
689
|
recoveryRebaseRandom: input.recoveryRebaseRandom,
|
|
690
690
|
// Answered-merge land (task `committed-recovery-honours-fresh-worktree-gate`,
|
|
691
|
-
//
|
|
691
|
+
// spec `land-time-reverify-and-parallel-merge-ceiling`): the apply-rung
|
|
692
692
|
// dispatches an answered `merge` through this committed-recovery tail (the
|
|
693
693
|
// branch already carries its done-move commit, so the build path's
|
|
694
694
|
// `git mv`+`add -A`+commit would raise `IntegrationNothingStaged`). UNLIKE
|
|
@@ -713,7 +713,7 @@ export async function performIntegration(
|
|
|
713
713
|
}
|
|
714
714
|
|
|
715
715
|
// The file whose `title:` seeds the commit summary + PR title. For a TASKING
|
|
716
|
-
// transition (a non-task `lifecycle`) this is the held
|
|
716
|
+
// transition (a non-task `lifecycle`) this is the held spec it supplies; for a
|
|
717
717
|
// build it is the task in its source folder. Read BEFORE any move.
|
|
718
718
|
const lifecycle = input.lifecycle;
|
|
719
719
|
// CONTINUE-BUILD (`source: 'done'`, task
|
|
@@ -869,7 +869,7 @@ export async function performIntegration(
|
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
|
|
872
|
-
// 1b. Gate 2 — the PR/code REVIEW gate (GATES
|
|
872
|
+
// 1b. Gate 2 — the PR/code REVIEW gate (GATES spec `work/specs/tasked/review.md`). It is a
|
|
873
873
|
// JUDGEMENT gate layered ON TOP of the deterministic `verify` floor (ADR §8)
|
|
874
874
|
// — NEVER a replacement, and ALWAYS verify-THEN-review on the SAME tree.
|
|
875
875
|
//
|
|
@@ -924,10 +924,10 @@ export async function performIntegration(
|
|
|
924
924
|
// never be the multi-line commit-subject run-on `--fill` would derive.
|
|
925
925
|
//
|
|
926
926
|
// When the lifecycle supplies an EXPLICIT `title`, use it DIRECTLY (no file read):
|
|
927
|
-
// the intake lone-task /
|
|
927
|
+
// the intake lone-task / spec path writes its output file in `stage()`, which runs
|
|
928
928
|
// AFTER this point, so a `titlePath` read would race the write and degrade the
|
|
929
|
-
// subject/PR title to the generic fallback. The `do
|
|
930
|
-
// `title` unset and keeps reading its already-existing held
|
|
929
|
+
// subject/PR title to the generic fallback. The `do spec:` tasking path leaves
|
|
930
|
+
// `title` unset and keeps reading its already-existing held spec (unchanged).
|
|
931
931
|
const explicitTitle = lifecycle?.title;
|
|
932
932
|
const taskTitle =
|
|
933
933
|
explicitTitle !== undefined ? explicitTitle : readTaskTitle(sourcePath);
|
|
@@ -943,7 +943,7 @@ export async function performIntegration(
|
|
|
943
943
|
|
|
944
944
|
// 2. STAGE the item move into the index. For a build that is the task done-move
|
|
945
945
|
// (`work/<source>/<slug>.md → work/done/<slug>.md`); for a TASKING
|
|
946
|
-
// transition (a non-task `lifecycle`) it is the caller-supplied
|
|
946
|
+
// transition (a non-task `lifecycle`) it is the caller-supplied spec
|
|
947
947
|
// lifecycle move + emitted backlog files (the runner stages them, the agent
|
|
948
948
|
// never does git). Either way the subsequent `git add -A` folds the agent's
|
|
949
949
|
// uncommitted work + this staging into ONE atomic commit.
|
|
@@ -1001,7 +1001,7 @@ export async function performIntegration(
|
|
|
1001
1001
|
// they are TRACKED, not dropped/untracked. Rule B is extended HERE: the runner REPORTS
|
|
1002
1002
|
// exactly which note files landed (honest reporting — what actually reached the commit,
|
|
1003
1003
|
// read from the staged set, not assumed). This is the ONE shared place — BOTH the build
|
|
1004
|
-
// path (`do <task>`/`run`/`complete`) and the tasking path (`do
|
|
1004
|
+
// path (`do <task>`/`run`/`complete`) and the tasking path (`do spec:`, via the
|
|
1005
1005
|
// `lifecycle` seam) route through it, so the channel is NOT forked. Zero notes ⇒ no
|
|
1006
1006
|
// report (the no-note case is byte-for-byte unchanged).
|
|
1007
1007
|
await reportScoopedNotes(cwd, env, note);
|
|
@@ -1099,7 +1099,7 @@ export async function performIntegration(
|
|
|
1099
1099
|
};
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
|
-
// PLAIN rebase. After the per-item-lock cut-over (
|
|
1102
|
+
// PLAIN rebase. After the per-item-lock cut-over (spec
|
|
1103
1103
|
// `ledger-status-per-item-lock-refs`, tasks 9a–9d) no transient status
|
|
1104
1104
|
// lands on a work branch: needs-attention is the lock `state: stuck` (not a
|
|
1105
1105
|
// `git mv` to `needs-attention/`), the body rests in `backlog/` while
|
|
@@ -1580,7 +1580,7 @@ export async function performIntegration(
|
|
|
1580
1580
|
}
|
|
1581
1581
|
|
|
1582
1582
|
/**
|
|
1583
|
-
* RECOVER an already-committed, already-done-moved STRANDED branch (
|
|
1583
|
+
* RECOVER an already-committed, already-done-moved STRANDED branch (spec
|
|
1584
1584
|
* `ledger-integrity` story 6, the `finish-already-committed-branch` task). The
|
|
1585
1585
|
* green work AND the `git mv → work/done/` are ALREADY committed on the work
|
|
1586
1586
|
* branch (a terminal push failed AFTER `performIntegration`'s steps 2–3), and the
|
|
@@ -1635,7 +1635,7 @@ async function recoverAlreadyCommitted(params: {
|
|
|
1635
1635
|
/**
|
|
1636
1636
|
* Run the EXISTING `runFreshWorktreeGate` (`prepare` then `verify`) on the
|
|
1637
1637
|
* rebased tip AFTER the rebase loop and BEFORE `applyCompleteTransition`
|
|
1638
|
-
* (task `committed-recovery-honours-fresh-worktree-gate`,
|
|
1638
|
+
* (task `committed-recovery-honours-fresh-worktree-gate`, spec
|
|
1639
1639
|
* `land-time-reverify-and-parallel-merge-ceiling`). The original stranded-
|
|
1640
1640
|
* recovery caller (`complete --integration`'s already-built strand) leaves
|
|
1641
1641
|
* this UNSET ⇒ no gate, no extra fetch — byte-identical to before. The
|
|
@@ -2322,7 +2322,7 @@ async function stagedCaptureNotes(
|
|
|
2322
2322
|
* The DURABLE `work/` status folders a slug's ledger file can resting-live in (the
|
|
2323
2323
|
* one-slug-one-folder set the invariant is asserted over). After the capstone
|
|
2324
2324
|
* cut-over (task `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`,
|
|
2325
|
-
*
|
|
2325
|
+
* spec `ledger-status-per-item-lock-refs`) the ONLY `work/` moves on `main` are the
|
|
2326
2326
|
* durable resting transitions, so the source a build completes FROM is `backlog/`
|
|
2327
2327
|
* (claim no longer moves the body, task
|
|
2328
2328
|
* `cutover-claim-body-stays-and-complete-sources-from-backlog`) and the canonical
|
|
@@ -2337,7 +2337,7 @@ async function stagedCaptureNotes(
|
|
|
2337
2337
|
* The folders {@link readArbiterLedgerPlacement} scans for a slug's source on the
|
|
2338
2338
|
* arbiter: the durable `LEDGER_STATUS_FOLDERS` (`tasks-ready`/`done`/`cancelled`)
|
|
2339
2339
|
* PLUS `tasks-backlog` (staging). Staging is included ONLY for the arbiter-side
|
|
2340
|
-
* source RESOLUTION of a `--allow-backlog` done-move (
|
|
2340
|
+
* source RESOLUTION of a `--allow-backlog` done-move (spec
|
|
2341
2341
|
* `do-allow-backlog-drive-staged-tasks-without-promotion`) and the one-slug-one-
|
|
2342
2342
|
* folder guard over the malformed "same slug in `tasks/ready/` AND `tasks/backlog/`"
|
|
2343
2343
|
* state; it is DELIBERATELY NOT added to the shared `LEDGER_STATUS_FOLDERS` (which
|
|
@@ -2384,12 +2384,12 @@ interface ArbiterLedgerPlacement {
|
|
|
2384
2384
|
* destination is unambiguous), mirroring the manual `279b542` cleanup.
|
|
2385
2385
|
*
|
|
2386
2386
|
* It scans {@link ARBITER_PLACEMENT_FOLDERS} — the durable `LEDGER_STATUS_FOLDERS`
|
|
2387
|
-
* PLUS `tasks-backlog`, so a `--allow-backlog` staged drive (
|
|
2387
|
+
* PLUS `tasks-backlog`, so a `--allow-backlog` staged drive (spec
|
|
2388
2388
|
* `do-allow-backlog-drive-staged-tasks-without-promotion`) whose done-move sources
|
|
2389
2389
|
* from `tasks/backlog/` is DISCOVERED here too (the arbiter is the authority for
|
|
2390
2390
|
* the actual source folder; the local `source` is the fallback). Including staging
|
|
2391
2391
|
* also makes the one-slug-one-folder guard cover the malformed "same slug in both
|
|
2392
|
-
* `tasks/ready/` and `tasks/backlog/`" state (the
|
|
2392
|
+
* `tasks/ready/` and `tasks/backlog/`" state (the spec's decision 5): it FAILS LOUD
|
|
2393
2393
|
* rather than the resolver silently arbitrating a collision the contract forbids.
|
|
2394
2394
|
*/
|
|
2395
2395
|
function readArbiterLedgerPlacement(
|
package/src/isolation.ts
CHANGED
|
@@ -112,10 +112,10 @@ export interface PrepareInput {
|
|
|
112
112
|
slug: string;
|
|
113
113
|
/**
|
|
114
114
|
* The item TYPE — `'task'` for a build (intake/`do task:`), `'prd'` for a
|
|
115
|
-
*
|
|
116
|
-
* {@link workBranchRef} so a same-slug task and
|
|
115
|
+
* spec-tasking run (`do spec:`). It NAMESPACES the work branch via
|
|
116
|
+
* {@link workBranchRef} so a same-slug task and spec never collide on the
|
|
117
117
|
* arbiter branch. Defaults to `'task'` (the overwhelmingly-common build
|
|
118
|
-
* path); the
|
|
118
|
+
* path); the spec-tasking path passes `'prd'` explicitly.
|
|
119
119
|
*/
|
|
120
120
|
type?: SlugNamespace;
|
|
121
121
|
/**
|
package/src/issue-provider.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {brand} from './brand.js';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The single provider-native PROCESSING LOCK label (task `intake-processing-lock`,
|
|
12
|
-
*
|
|
12
|
+
* spec `issue-intake` US #10): a TRANSIENT concurrency mutex — added on start (the
|
|
13
13
|
* winner only), removed on finish — that serialises two concurrent `intake` runs on
|
|
14
14
|
* the SAME issue. It is namespaced under the brand (`dorfl:processing`) so it
|
|
15
15
|
* cannot collide with a user's own labels. It carries NO `work/` state — it is NOT a
|
|
@@ -19,7 +19,7 @@ import {brand} from './brand.js';
|
|
|
19
19
|
export const PROCESSING_LOCK_LABEL = `${brand.base}:processing`;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* The **issue seam** (
|
|
22
|
+
* The **issue seam** (spec `issue-intake`, task `intake-tracer-slice-outcome`):
|
|
23
23
|
* the provider-pluggable surface `intake <N>` reads an issue + its comment thread
|
|
24
24
|
* through, and posts a clarifying comment back onto. It is the SIBLING of the
|
|
25
25
|
* review-request `ReviewProvider` (`integrator.ts` / `github.ts`): both name a
|
|
@@ -33,7 +33,7 @@ export const PROCESSING_LOCK_LABEL = `${brand.base}:processing`;
|
|
|
33
33
|
* `intake-closes-issue-on-bounce`) is the ATOMIC close used on a BOUNCE — a
|
|
34
34
|
* terminal outcome, so intake closes the issue directly (comment + `not planned`
|
|
35
35
|
* + close in ONE call). It is ALSO the method CI's future close-job uses for the
|
|
36
|
-
* task/
|
|
36
|
+
* task/spec path; only the BOUNCE close is intake's.
|
|
37
37
|
*
|
|
38
38
|
* The label ops are a TRANSIENT CONCURRENCY MUTEX carrying NO `work/` state — ONE
|
|
39
39
|
* lock label, added-on-start / removed-on-finish. They are NOT a label
|
|
@@ -295,7 +295,7 @@ export interface IssueProvider {
|
|
|
295
295
|
* reason IN THE SAME atomic operation (`gh issue close <N> [--comment <body>]
|
|
296
296
|
* [--reason "not planned"]`). Used on a BOUNCE (terminal: comment + `not
|
|
297
297
|
* planned` + close in ONE call — no post-then-close partial-failure window) and,
|
|
298
|
-
* later, by CI's task/
|
|
298
|
+
* later, by CI's task/spec close-job. The RUNNER calls this; the agent stays
|
|
299
299
|
* seam-free. NEVER throws — a missing/unauthenticated `gh` DEGRADES, surfacing
|
|
300
300
|
* the REAL `gh` stderr via {@link CloseIssueResult.reason} (NOT a hard-coded
|
|
301
301
|
* guess), so the terminal outcome is unchanged and the cause stays diagnosable.
|
package/src/item-lock.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {resolveSidecarIdentity, type SidecarType} from './sidecar.js';
|
|
|
4
4
|
import {workItemRel} from './work-layout.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The **unified item-lock module** (
|
|
7
|
+
* The **unified item-lock module** (spec `ledger-status-per-item-lock-refs`, ADR
|
|
8
8
|
* `ledger-status-on-per-item-lock-refs`). The runner's ONE lock primitive: ONE
|
|
9
9
|
* lock per item, on a PER-ITEM hidden ref `refs/dorfl/lock/<entry>`,
|
|
10
10
|
* acquired by an ATOMIC create-only push and released by DELETING the ref, with a
|
|
@@ -16,12 +16,12 @@ import {workItemRel} from './work-layout.js';
|
|
|
16
16
|
* It GENERALISES the green tracer that proved the dangerous core end-to-end on a
|
|
17
17
|
* bare `file://` arbiter (the tracer is now this file). The one production
|
|
18
18
|
* difference from the tracer is the IDENTITY SEAM: callers pass a NAMESPACED item
|
|
19
|
-
* identity (`task:<slug>` / `
|
|
19
|
+
* identity (`task:<slug>` / `spec:<slug>` / `observation:<slug>` / `obs:<slug>`,
|
|
20
20
|
* or a bare `<slug>` = task), and this module derives the type-encoded lock
|
|
21
21
|
* `<entry>` (`<type>-<slug>`) through {@link resolveSidecarIdentity} — the SAME
|
|
22
22
|
* single source of truth the sidecar (`work/questions/<type>-<slug>.md`) and the
|
|
23
23
|
* work branch (`work/<type>-<slug>`) already use. There is deliberately NO second
|
|
24
|
-
* identity scheme: a task, a
|
|
24
|
+
* identity scheme: a task, a spec,
|
|
25
25
|
* and an observation that share a slug get DISTINCT lock refs, and the SAME item
|
|
26
26
|
* under different actions shares ONE ref (so implement / task / advance on one
|
|
27
27
|
* item are mutually exclusive by construction).
|
|
@@ -63,7 +63,7 @@ export const LOCK_REF_PREFIX = 'refs/dorfl/lock';
|
|
|
63
63
|
* (`<type>-<slug>`) from a NAMESPACED item identity, through the shared
|
|
64
64
|
* {@link resolveSidecarIdentity} resolver (the single source of truth, which the
|
|
65
65
|
* sidecar filename + the advancing-lock marker also key onto). Accepts the same
|
|
66
|
-
* forms as that resolver: `task:<slug>` / `
|
|
66
|
+
* forms as that resolver: `task:<slug>` / `spec:<slug>` / `observation:<slug>` /
|
|
67
67
|
* `obs:<slug>`, or a bare `<slug>` (= task). Acquire/release/read ALL key
|
|
68
68
|
* through THIS function, so there is one — and only one — addressing scheme.
|
|
69
69
|
*/
|
|
@@ -132,7 +132,7 @@ export interface ReleaseResult {
|
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
134
|
* Outcome of an AMEND-style transition (mark-stuck / resume / requeue) — the
|
|
135
|
-
* lock-entry STATE MACHINE's interior moves (
|
|
135
|
+
* lock-entry STATE MACHINE's interior moves (spec `ledger-status-per-item-lock-refs`,
|
|
136
136
|
* the C8 lock-entry state machine in the design trail). Each is a single CAS on the
|
|
137
137
|
* held ref (no retry loop), so the verdict is definitive:
|
|
138
138
|
* - `transitioned` — we won the CAS; the entry now holds the target `(action, state)`.
|
|
@@ -269,7 +269,7 @@ async function gitHardInput(
|
|
|
269
269
|
}
|
|
270
270
|
export interface AcquireOptions {
|
|
271
271
|
/**
|
|
272
|
-
* The NAMESPACED item identity to lock (`task:<slug>` / `
|
|
272
|
+
* The NAMESPACED item identity to lock (`task:<slug>` / `spec:<slug>` /
|
|
273
273
|
* `observation:<slug>` / `obs:<slug>`, or a bare `<slug>` = task). Resolved to
|
|
274
274
|
* the type-encoded lock `<entry>` through {@link lockEntryFor}.
|
|
275
275
|
*/
|
|
@@ -440,7 +440,7 @@ export interface ReleaseHeldResult {
|
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
/**
|
|
443
|
-
* GUARDED release for a runner that KNOWS it acquired and HELD the lock (
|
|
443
|
+
* GUARDED release for a runner that KNOWS it acquired and HELD the lock (spec
|
|
444
444
|
* `ledger-status-per-item-lock-refs` US #13): unlike {@link releaseItemLock} —
|
|
445
445
|
* whose `not-held` is a BENIGN idempotent case the complete/tasking/needs-attention
|
|
446
446
|
* callers tolerate (the body may predate the lock, or a crash-recovery may have
|
|
@@ -866,15 +866,15 @@ export async function readItemLock(
|
|
|
866
866
|
* authoritative resting records the cross-substrate reconciliation reads. An
|
|
867
867
|
* item is TERMINAL on `main` iff ANY of these paths exists on `<arbiter>/main`.
|
|
868
868
|
* The won't-proceed terminal is PER-REGIME (the slug-collision correctness fix:
|
|
869
|
-
* a dropped task and a dropped
|
|
869
|
+
* a dropped task and a dropped spec sharing a slug used to collide on one
|
|
870
870
|
* bare-slug `work/dropped/<slug>.md`):
|
|
871
871
|
* - a TASK: `work/tasks/done/<slug>.md` (completed) OR
|
|
872
872
|
* `work/tasks/cancelled/<slug>.md` (the task regime's won't-proceed terminal).
|
|
873
|
-
* - a
|
|
874
|
-
* (the
|
|
873
|
+
* - a SPEC: `work/specs/tasked/<slug>.md` (tasked) OR `work/specs/dropped/<slug>.md`
|
|
874
|
+
* (the spec regime's won't-proceed terminal).
|
|
875
875
|
* - an OBSERVATION: NONE. A note has no durable terminal folder — it leaves by
|
|
876
876
|
* deletion (its absence, not a terminal record, is the end state). A promoted
|
|
877
|
-
* observation becomes a NEW task/
|
|
877
|
+
* observation becomes a NEW task/spec with its own ref.
|
|
878
878
|
*/
|
|
879
879
|
export function terminalMainPaths(type: SidecarType, slug: string): string[] {
|
|
880
880
|
const file = `${slug}.md`;
|
|
@@ -895,7 +895,7 @@ export function terminalMainPaths(type: SidecarType, slug: string): string[] {
|
|
|
895
895
|
}
|
|
896
896
|
|
|
897
897
|
/** The outcome of a cross-substrate reconciliation of one item's lock against
|
|
898
|
-
* the authoritative `main` durable record (
|
|
898
|
+
* the authoritative `main` durable record (spec `ledger-status-per-item-lock-refs`
|
|
899
899
|
* US #9/#10; ADR `ledger-status-on-per-item-lock-refs`). */
|
|
900
900
|
export type ReconcileOutcome =
|
|
901
901
|
| 'cleared-stale' // `main` is terminal + the lock was `active` (stranded) → cleared
|
|
@@ -910,20 +910,20 @@ export interface ReconcileResult {
|
|
|
910
910
|
entry: string;
|
|
911
911
|
ref: string;
|
|
912
912
|
/** Whether `<arbiter>/main` shows the item terminal (per {@link terminalMainPaths}:
|
|
913
|
-
* a task at `tasks/done`/`tasks/cancelled`, a
|
|
913
|
+
* a task at `tasks/done`/`tasks/cancelled`, a spec at `specs/tasked`/`specs/dropped`). */
|
|
914
914
|
terminalOnMain: boolean;
|
|
915
915
|
message: string;
|
|
916
916
|
}
|
|
917
917
|
|
|
918
918
|
/**
|
|
919
919
|
* Reconcile ONE item's per-item lock against the AUTHORITATIVE `main` durable
|
|
920
|
-
* record — the heart of complete's cross-substrate crash-safety (
|
|
920
|
+
* record — the heart of complete's cross-substrate crash-safety (spec
|
|
921
921
|
* `ledger-status-per-item-lock-refs` US #9/#10; ADR
|
|
922
922
|
* `ledger-status-on-per-item-lock-refs`; the design trail's Amendment 6).
|
|
923
923
|
*
|
|
924
924
|
* complete's order is hold lock → land the DURABLE `main` move FIRST → release
|
|
925
925
|
* the lock SECOND. A crash BETWEEN the move and the release leaves a
|
|
926
|
-
* terminal-on-`main` item (a completed/cancelled task or a tasked/dropped
|
|
926
|
+
* terminal-on-`main` item (a completed/cancelled task or a tasked/dropped spec,
|
|
927
927
|
* per {@link terminalMainPaths}) with a STILL-HELD lock — a stale lock with no
|
|
928
928
|
* in-flight work behind it. This is the recovery that converges it.
|
|
929
929
|
*
|
|
@@ -1219,7 +1219,7 @@ export interface LockReportEntry {
|
|
|
1219
1219
|
reconcile: ReconcileOutcome;
|
|
1220
1220
|
}
|
|
1221
1221
|
|
|
1222
|
-
/** The `gc --ledger` stuck/orphaned-lock REPORT (
|
|
1222
|
+
/** The `gc --ledger` stuck/orphaned-lock REPORT (spec
|
|
1223
1223
|
* `ledger-status-per-item-lock-refs` US #14): every lingering per-item lock on the
|
|
1224
1224
|
* arbiter, each classified read-only against `main`. An EMPTY list = no locks held
|
|
1225
1225
|
* (an absent ref namespace reads as `[]`, the recoverable "all locks released"
|
|
@@ -1229,7 +1229,7 @@ export interface ItemLockReport {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
|
|
1231
1231
|
/**
|
|
1232
|
-
* Build the `gc --ledger` stuck/orphaned-lock REPORT (
|
|
1232
|
+
* Build the `gc --ledger` stuck/orphaned-lock REPORT (spec
|
|
1233
1233
|
* `ledger-status-per-item-lock-refs` US #12/#13/#14; ADR
|
|
1234
1234
|
* `ledger-status-on-per-item-lock-refs`): enumerate every per-item lock currently
|
|
1235
1235
|
* held on the arbiter ({@link listItemLockEntries} — held active + stuck, with
|
|
@@ -1282,7 +1282,7 @@ export async function reportItemLocks(
|
|
|
1282
1282
|
*/
|
|
1283
1283
|
/**
|
|
1284
1284
|
* Does the `gc --ledger` lock report contain a lock that NEEDS HUMAN ATTENTION
|
|
1285
|
-
* (
|
|
1285
|
+
* (spec US#14/#21; ADR `ledger-status-on-per-item-lock-refs`: this surface is the
|
|
1286
1286
|
* STUCK / crash-orphaned lock, NOT every held one)? TRUE iff some lock is
|
|
1287
1287
|
* `kept-stuck` (terminal-on-`main` + stuck) or `cleared-stale`-eligible
|
|
1288
1288
|
* (terminal-on-`main` + a stale active orphan). A `kept-in-flight` (active,
|
|
@@ -1391,7 +1391,7 @@ export interface ReapReport {
|
|
|
1391
1391
|
}
|
|
1392
1392
|
|
|
1393
1393
|
/**
|
|
1394
|
-
* The OPT-IN `gc --ledger --reap-stale-locks` SWEEP (
|
|
1394
|
+
* The OPT-IN `gc --ledger --reap-stale-locks` SWEEP (spec
|
|
1395
1395
|
* `ledger-status-per-item-lock-refs` US #14): a human asserting "clear the dead
|
|
1396
1396
|
* TERMINAL locks now", so one command sweeps every orphaned terminal lock instead
|
|
1397
1397
|
* of N hand-run `release-lock`s. It is the WRITE twin of {@link reportItemLocks}
|
|
@@ -1631,7 +1631,7 @@ export async function listItemLocks(
|
|
|
1631
1631
|
|
|
1632
1632
|
/**
|
|
1633
1633
|
* Read the FULL lock entries currently held on the arbiter — the `status`/`scan`
|
|
1634
|
-
* in-flight read path (
|
|
1634
|
+
* in-flight read path (spec `ledger-status-per-item-lock-refs` US #8; task
|
|
1635
1635
|
* `needs-attention-as-stuck-lock-state`). One fetch of the lock refs, then read
|
|
1636
1636
|
* each held entry's `lock.md` blob, returning the parsed {@link LockEntry} for
|
|
1637
1637
|
* every ref (so a caller can surface `active` (in-progress) and `stuck`
|
|
@@ -1688,7 +1688,7 @@ export async function listItemLockEntries(
|
|
|
1688
1688
|
|
|
1689
1689
|
/**
|
|
1690
1690
|
* List the TASK slugs currently lock-held on the arbiter — the held-slug set the
|
|
1691
|
-
* `ready/` pool readers SUBTRACT (
|
|
1691
|
+
* `ready/` pool readers SUBTRACT (spec `ledger-status-per-item-lock-refs` US #15;
|
|
1692
1692
|
* task `claim-acquires-unified-lock-no-body-move`). Enumerates {@link listItemLocks}
|
|
1693
1693
|
* and keeps only the `task-<slug>` entries (a prd/observation lock does not gate
|
|
1694
1694
|
* the TASK pool), mapping each to its bare `<slug>`.
|
package/src/item-path.ts
CHANGED
|
@@ -25,7 +25,7 @@ import type {WorkFolderKey} from './work-layout.js';
|
|
|
25
25
|
* (`tasks-backlog`, `prds-proposed`) on purpose: a concurrent `promote` may have
|
|
26
26
|
* just `git mv`'d the item from staging into the pool between an apply's CAPTURE
|
|
27
27
|
* and WRITE, and the apply must resolve to the post-move path — the whole point of
|
|
28
|
-
* folder-agnostic apply (F3a of
|
|
28
|
+
* folder-agnostic apply (F3a of spec `staging-surface-and-apply-promote-safety`).
|
|
29
29
|
* Terminal-only folders (`cancelled`, `prds-dropped`, `needs-attention`) are NOT
|
|
30
30
|
* here — once an item has reached a terminal, the apply is OVER, and a re-resolve
|
|
31
31
|
* into a terminal would mean the item has effectively vanished from the active
|
|
@@ -55,7 +55,7 @@ export const APPLY_LIFECYCLE_FOLDERS: Record<
|
|
|
55
55
|
* move) — the apply rung then exits CLEAN (no commit, no ghost file), routed as the
|
|
56
56
|
* `vanished` outcome.
|
|
57
57
|
*
|
|
58
|
-
* This is the F3a fix from
|
|
58
|
+
* This is the F3a fix from spec `staging-surface-and-apply-promote-safety`: the
|
|
59
59
|
* sidecar is already identity-keyed and folder-agnostic; the item path is now the
|
|
60
60
|
* same. A concurrent `promote` that `git mv`'d the item out from under a captured
|
|
61
61
|
* path can no longer cause a stale-path write.
|
package/src/ledger-lint.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from './work-layout.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* The **one-slug-one-folder LINT** over the `work/` lifecycle ledger (
|
|
15
|
+
* The **one-slug-one-folder LINT** over the `work/` lifecycle ledger (spec
|
|
16
16
|
* `ledger-integrity`, story 3 — the READ-side belt-and-suspenders for defect 1).
|
|
17
17
|
*
|
|
18
18
|
* `work/` IS the ledger: a task's STATUS is the FOLDER its single `.md` lives in
|
|
@@ -40,14 +40,14 @@ import {
|
|
|
40
40
|
* The `work/` STATUS folders a task's ledger file can rest in — the
|
|
41
41
|
* one-slug-one-folder set this lint is asserted over (WORK-CONTRACT.md
|
|
42
42
|
* "status = the folder"). After the capstone cut-over (task
|
|
43
|
-
* `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`,
|
|
43
|
+
* `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`, spec
|
|
44
44
|
* `ledger-status-per-item-lock-refs`; ADR `ledger-status-on-per-item-lock-refs`)
|
|
45
45
|
* the ONLY `work/` moves on `main` are the DURABLE RESTING transitions, so a
|
|
46
46
|
* task's ledger file can rest only in the DURABLE set: the pool `backlog/`, the
|
|
47
47
|
* terminal `done/`, and the task regime's PER-REGIME "won't-proceed" terminal
|
|
48
|
-
* `tasks/cancelled/` (the per-regime split of the previous shared `dropped/`,
|
|
48
|
+
* `tasks/cancelled/` (the per-regime split of the previous shared `dropped/`, spec
|
|
49
49
|
* `folder-taxonomy-reorg-and-rename` US #10; the specific REASON lives in the item
|
|
50
|
-
* BODY as a `reason:` value). The
|
|
50
|
+
* BODY as a `reason:` value). The spec regime's terminal `specs/dropped/` is a
|
|
51
51
|
* SEPARATE namespace and is NOT a task-status folder. The transient
|
|
52
52
|
* `in-progress`/`needs-attention`/`tasking`/
|
|
53
53
|
* `advancing` are GONE from `main`'s tree — they are per-item lock-ref state
|
|
@@ -58,11 +58,11 @@ import {
|
|
|
58
58
|
* `cancelled`). A read-side lint surfaces a slug that ends up in `tasks/cancelled/`
|
|
59
59
|
* AND another status folder, so the lint covers all three.
|
|
60
60
|
*
|
|
61
|
-
* The capture buckets (`ideas`/`observations`/`findings`) and the
|
|
62
|
-
* (`
|
|
63
|
-
* are "exempt from status = folder"; the
|
|
61
|
+
* The capture buckets (`ideas`/`observations`/`findings`) and the spec-flow folders
|
|
62
|
+
* (`specs/ready`/`specs/tasked`) are NOT task-status folders (WORK-CONTRACT.md: the buckets
|
|
63
|
+
* are "exempt from status = folder"; the spec folders carry prds, a separate
|
|
64
64
|
* namespace) — they are deliberately EXCLUDED so a slug that legitimately has both
|
|
65
|
-
* a task and a same-named note/
|
|
65
|
+
* a task and a same-named note/spec is never a false positive.
|
|
66
66
|
*/
|
|
67
67
|
export {LEDGER_STATUS_FOLDERS, type LedgerStatusFolder} from './work-layout.js';
|
|
68
68
|
|
|
@@ -279,7 +279,7 @@ export interface LedgerSweepResult {
|
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
/**
|
|
282
|
-
* The `gc`-STYLE ledger SWEEP (
|
|
282
|
+
* The `gc`-STYLE ledger SWEEP (spec story 3's belt-and-suspenders): on demand,
|
|
283
283
|
* REPORT every slug present in more than one status folder of a LOCAL `work/`
|
|
284
284
|
* ledger, naming the folders and the CANDIDATE canonical folder — and NEVER
|
|
285
285
|
* auto-delete. A human confirms the cleanup (keep the canonical copy, delete the
|