dorfl 0.1.1 → 0.2.0
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 +8 -8
- package/dist/advance-drivers.d.ts.map +1 -1
- package/dist/advance-drivers.js +20 -8
- 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.d.ts.map +1 -1
- package/dist/advance-lifecycle-template.js +85 -13
- 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 +24 -1
- package/dist/advance-treeless-publish.d.ts.map +1 -1
- package/dist/advance-treeless-publish.js +41 -0
- package/dist/advance-treeless-publish.js.map +1 -1
- package/dist/advance.d.ts +69 -17
- package/dist/advance.d.ts.map +1 -1
- package/dist/advance.js +409 -102
- package/dist/advance.js.map +1 -1
- package/dist/advancing-lock.d.ts +31 -3
- package/dist/advancing-lock.d.ts.map +1 -1
- package/dist/advancing-lock.js +55 -5
- package/dist/advancing-lock.js.map +1 -1
- package/dist/agent-launch.d.ts +12 -0
- package/dist/agent-launch.d.ts.map +1 -1
- package/dist/agent-launch.js +22 -12
- package/dist/agent-launch.js.map +1 -1
- package/dist/agent-stop.d.ts +40 -2
- package/dist/agent-stop.d.ts.map +1 -1
- package/dist/agent-stop.js +30 -2
- package/dist/agent-stop.js.map +1 -1
- package/dist/apply-decide.d.ts +19 -5
- package/dist/apply-decide.d.ts.map +1 -1
- package/dist/apply-decide.js +38 -9
- package/dist/apply-decide.js.map +1 -1
- package/dist/apply-merge-action.d.ts +20 -8
- package/dist/apply-merge-action.d.ts.map +1 -1
- package/dist/apply-merge-action.js +44 -9
- package/dist/apply-merge-action.js.map +1 -1
- package/dist/apply-persist.d.ts +62 -31
- package/dist/apply-persist.d.ts.map +1 -1
- package/dist/apply-persist.js +173 -44
- package/dist/apply-persist.js.map +1 -1
- package/dist/apply-stuck-action.d.ts +151 -0
- package/dist/apply-stuck-action.d.ts.map +1 -0
- package/dist/apply-stuck-action.js +125 -0
- package/dist/apply-stuck-action.js.map +1 -0
- package/dist/brand.d.ts +12 -1
- package/dist/brand.d.ts.map +1 -1
- package/dist/brand.js +2 -1
- package/dist/brand.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-spinner.d.ts +1 -1
- package/dist/cli-spinner.js +1 -1
- package/dist/cli.d.ts +10 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +385 -128
- package/dist/cli.js.map +1 -1
- package/dist/close-job-template.d.ts +3 -3
- package/dist/close-job-template.js +9 -9
- 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 +9 -6
- package/dist/complete.d.ts.map +1 -1
- package/dist/complete.js +99 -45
- 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 +86 -40
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +61 -9
- package/dist/config.js.map +1 -1
- package/dist/continue-branch.d.ts +1 -1
- package/dist/continue-branch.d.ts.map +1 -1
- package/dist/continue-branch.js +23 -1
- package/dist/continue-branch.js.map +1 -1
- package/dist/cwd-section.js +1 -1
- package/dist/cwd-section.js.map +1 -1
- package/dist/decision-engine.d.ts +39 -11
- package/dist/decision-engine.d.ts.map +1 -1
- package/dist/decision-engine.js +10 -6
- package/dist/decision-engine.js.map +1 -1
- package/dist/do-autopick.d.ts +6 -6
- package/dist/do-autopick.d.ts.map +1 -1
- package/dist/do-autopick.js +16 -6
- package/dist/do-autopick.js.map +1 -1
- package/dist/do-config.d.ts +4 -4
- 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 +74 -81
- package/dist/do.d.ts.map +1 -1
- package/dist/do.js +439 -50
- package/dist/do.js.map +1 -1
- package/dist/drop-source.d.ts +2 -2
- package/dist/env-config.d.ts.map +1 -1
- package/dist/env-config.js +19 -11
- package/dist/env-config.js.map +1 -1
- package/dist/failure-cause.d.ts +3 -2
- package/dist/failure-cause.d.ts.map +1 -1
- package/dist/failure-cause.js +28 -1
- package/dist/failure-cause.js.map +1 -1
- package/dist/format.d.ts +6 -6
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +13 -30
- package/dist/format.js.map +1 -1
- package/dist/frontmatter.d.ts +28 -15
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +38 -24
- package/dist/frontmatter.js.map +1 -1
- package/dist/gc.d.ts +65 -6
- package/dist/gc.d.ts.map +1 -1
- package/dist/gc.js +126 -9
- package/dist/gc.js.map +1 -1
- package/dist/github.d.ts +14 -0
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +73 -0
- package/dist/github.js.map +1 -1
- package/dist/harness.d.ts +25 -0
- package/dist/harness.d.ts.map +1 -1
- package/dist/harness.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/install-ci-branch-protection.d.ts +133 -39
- package/dist/install-ci-branch-protection.d.ts.map +1 -1
- package/dist/install-ci-branch-protection.js +191 -49
- package/dist/install-ci-branch-protection.js.map +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 +24 -4
- package/dist/install-ci-core.d.ts.map +1 -1
- package/dist/install-ci-core.js +12 -5
- package/dist/install-ci-core.js.map +1 -1
- package/dist/install-ci-github.d.ts +33 -1
- package/dist/install-ci-github.d.ts.map +1 -1
- package/dist/install-ci-github.js +74 -1
- package/dist/install-ci-github.js.map +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/install-skills.d.ts +123 -0
- package/dist/install-skills.d.ts.map +1 -0
- package/dist/install-skills.js +100 -0
- package/dist/install-skills.js.map +1 -0
- 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 +17 -17
- package/dist/intake-trigger-template.js.map +1 -1
- package/dist/intake.d.ts +65 -52
- package/dist/intake.d.ts.map +1 -1
- package/dist/intake.js +92 -76
- package/dist/intake.js.map +1 -1
- package/dist/integration-core.d.ts +27 -24
- package/dist/integration-core.d.ts.map +1 -1
- package/dist/integration-core.js +191 -77
- package/dist/integration-core.js.map +1 -1
- package/dist/integrator.d.ts +1 -1
- package/dist/integrator.d.ts.map +1 -1
- package/dist/integrator.js +19 -3
- package/dist/integrator.js.map +1 -1
- package/dist/isolation.d.ts +4 -4
- package/dist/isolation.d.ts.map +1 -1
- package/dist/isolation.js +9 -0
- package/dist/isolation.js.map +1 -1
- package/dist/issue-provider.d.ts +4 -4
- package/dist/issue-provider.js +1 -1
- package/dist/item-lock.d.ts +216 -149
- package/dist/item-lock.d.ts.map +1 -1
- package/dist/item-lock.js +345 -270
- package/dist/item-lock.js.map +1 -1
- 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 +33 -28
- package/dist/ledger-write.d.ts.map +1 -1
- package/dist/ledger-write.js +100 -122
- package/dist/ledger-write.js.map +1 -1
- package/dist/lifecycle-gather.d.ts +18 -1
- package/dist/lifecycle-gather.d.ts.map +1 -1
- package/dist/lifecycle-gather.js +23 -17
- package/dist/lifecycle-gather.js.map +1 -1
- package/dist/lifecycle-pools.d.ts +44 -7
- package/dist/lifecycle-pools.d.ts.map +1 -1
- package/dist/lifecycle-pools.js +27 -7
- package/dist/lifecycle-pools.js.map +1 -1
- package/dist/merge-question-surfacer.d.ts +18 -4
- package/dist/merge-question-surfacer.d.ts.map +1 -1
- package/dist/merge-question-surfacer.js +20 -5
- package/dist/merge-question-surfacer.js.map +1 -1
- package/dist/migrate-stuck-locks.d.ts +129 -0
- package/dist/migrate-stuck-locks.d.ts.map +1 -0
- package/dist/migrate-stuck-locks.js +355 -0
- package/dist/migrate-stuck-locks.js.map +1 -0
- 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 +304 -27
- package/dist/needs-attention.d.ts.map +1 -1
- package/dist/needs-attention.js +542 -67
- package/dist/needs-attention.js.map +1 -1
- package/dist/orphan-sidecar.d.ts +10 -6
- package/dist/orphan-sidecar.d.ts.map +1 -1
- package/dist/orphan-sidecar.js +35 -2
- package/dist/orphan-sidecar.js.map +1 -1
- package/dist/pi-harness.d.ts +16 -0
- package/dist/pi-harness.d.ts.map +1 -1
- package/dist/pi-harness.js +82 -2
- package/dist/pi-harness.js.map +1 -1
- package/dist/placement.d.ts +8 -8
- package/dist/placement.js +3 -3
- package/dist/prd-to-spec.d.ts.map +1 -1
- package/dist/prd-to-spec.js +9 -5
- package/dist/prd-to-spec.js.map +1 -1
- package/dist/prompt.d.ts +16 -19
- package/dist/prompt.d.ts.map +1 -1
- package/dist/prompt.js +17 -19
- package/dist/prompt.js.map +1 -1
- package/dist/protocol/CLAIM-PROTOCOL.md +17 -10
- package/dist/protocol/REVIEW-PROTOCOL.md +4 -1
- package/dist/protocol/SURFACE-PROTOCOL.md +16 -2
- package/dist/protocol/TASKING-PROTOCOL.md +3 -1
- package/dist/protocol/WORK-CONTRACT.md +22 -18
- package/dist/protocol/task-template.md +1 -1
- package/dist/readiness.d.ts +1 -1
- package/dist/reap-branches.d.ts +12 -9
- package/dist/reap-branches.d.ts.map +1 -1
- package/dist/reap-branches.js +25 -7
- package/dist/reap-branches.js.map +1 -1
- package/dist/recover-isolated.d.ts +12 -0
- package/dist/recover-isolated.d.ts.map +1 -1
- package/dist/recover-isolated.js +6 -1
- package/dist/recover-isolated.js.map +1 -1
- package/dist/repo-config.d.ts +23 -2
- package/dist/repo-config.d.ts.map +1 -1
- package/dist/repo-config.js +64 -18
- package/dist/repo-config.js.map +1 -1
- package/dist/repo-mirror.d.ts.map +1 -1
- package/dist/repo-mirror.js +18 -2
- package/dist/repo-mirror.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 +2 -2
- package/dist/review-verdict.js.map +1 -1
- package/dist/run.d.ts +2 -2
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +58 -23
- package/dist/run.js.map +1 -1
- package/dist/scan.d.ts +26 -17
- package/dist/scan.d.ts.map +1 -1
- package/dist/scan.js +29 -15
- package/dist/scan.js.map +1 -1
- package/dist/select-order.d.ts +1 -1
- package/dist/select-priority.d.ts +14 -14
- 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-apply.js +1 -1
- package/dist/sidecar-apply.js.map +1 -1
- package/dist/sidecar.d.ts +47 -12
- package/dist/sidecar.d.ts.map +1 -1
- package/dist/sidecar.js +84 -4
- package/dist/sidecar.js.map +1 -1
- package/dist/skills/answer-questions/SKILL.md +89 -0
- package/dist/skills/capture-signal/SKILL.md +52 -0
- package/dist/skills/convert-from-prd-to-spec/SKILL.md +90 -0
- package/dist/skills/drive-tasks/SKILL.md +218 -0
- package/dist/skills/from-idea/SKILL.md +83 -0
- package/dist/skills/merge-prs/SKILL.md +70 -0
- package/dist/skills/orchestrate/SKILL.md +101 -0
- package/dist/skills/promote/SKILL.md +35 -0
- package/dist/skills/review/SKILL.md +16 -0
- package/dist/skills/setup/SKILL.md +258 -0
- package/dist/skills/setup/protocol/ADR-FORMAT.md +47 -0
- package/dist/skills/setup/protocol/CLAIM-PROTOCOL.md +224 -0
- package/dist/skills/setup/protocol/REVIEW-PROTOCOL.md +122 -0
- package/dist/skills/setup/protocol/SURFACE-PROTOCOL.md +135 -0
- package/dist/skills/setup/protocol/TASKING-PROTOCOL.md +124 -0
- package/dist/skills/setup/protocol/WORK-CONTRACT.md +280 -0
- package/dist/skills/setup/protocol/spec-template.md +71 -0
- package/dist/skills/setup/protocol/task-template.md +65 -0
- package/dist/skills/surface-questions/SKILL.md +16 -0
- package/dist/skills/to-spec/SKILL.md +34 -0
- package/dist/skills/to-task/SKILL.md +19 -0
- package/dist/skills/triage-observations/SKILL.md +78 -0
- package/dist/skills/work/SKILL.md +51 -0
- package/dist/slug-namespace.d.ts +6 -6
- package/dist/slug-namespace.js +8 -8
- package/dist/slug-namespace.js.map +1 -1
- package/dist/spec-complete.d.ts.map +1 -1
- package/dist/spec-complete.js +4 -5
- package/dist/spec-complete.js.map +1 -1
- package/dist/start.d.ts +1 -1
- package/dist/start.d.ts.map +1 -1
- package/dist/start.js +54 -60
- 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-gate.js +10 -3
- package/dist/surface-gate.js.map +1 -1
- package/dist/surface-persist.d.ts +2 -2
- package/dist/surface-persist.d.ts.map +1 -1
- package/dist/surface-persist.js +1 -1
- package/dist/surface-persist.js.map +1 -1
- package/dist/tasker-review-loop.d.ts +11 -10
- 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 +10 -10
- package/dist/tasking-lock.d.ts.map +1 -1
- package/dist/tasking-lock.js +69 -49
- package/dist/tasking-lock.js.map +1 -1
- package/dist/tasking.d.ts +73 -39
- package/dist/tasking.d.ts.map +1 -1
- package/dist/tasking.js +309 -95
- package/dist/tasking.js.map +1 -1
- package/dist/triage-gate.d.ts +1 -1
- package/dist/triage-persist.d.ts +15 -11
- package/dist/triage-persist.d.ts.map +1 -1
- package/dist/triage-persist.js +48 -18
- package/dist/triage-persist.js.map +1 -1
- package/dist/vendor/incur/agents.d.ts +58 -0
- package/dist/vendor/incur/agents.d.ts.map +1 -0
- package/dist/vendor/incur/agents.js +343 -0
- package/dist/vendor/incur/agents.js.map +1 -0
- package/dist/verify-workflow-template.d.ts +1 -1
- package/dist/verify-workflow-template.js +3 -3
- package/dist/watch-session.d.ts +11 -3
- package/dist/watch-session.d.ts.map +1 -1
- package/dist/watch-session.js +94 -7
- package/dist/watch-session.js.map +1 -1
- package/dist/work-layout.d.ts +15 -9
- package/dist/work-layout.d.ts.map +1 -1
- package/dist/work-layout.js +14 -9
- package/dist/work-layout.js.map +1 -1
- package/dist/workspace.d.ts +2 -2
- package/package.json +2 -2
- package/src/advance-ci-template.ts +4 -4
- package/src/advance-classify.ts +5 -5
- package/src/advance-drivers.ts +26 -13
- package/src/advance-isolated.ts +3 -3
- package/src/advance-lifecycle-template.ts +98 -13
- package/src/advance-loop-driver.ts +3 -3
- package/src/advance-treeless-publish.ts +46 -1
- package/src/advance.ts +495 -115
- package/src/advancing-lock.ts +102 -7
- package/src/agent-launch.ts +37 -12
- package/src/agent-stop.ts +60 -2
- package/src/apply-decide.ts +38 -9
- package/src/apply-merge-action.ts +49 -11
- package/src/apply-persist.ts +236 -62
- package/src/apply-stuck-action.ts +260 -0
- package/src/brand.ts +14 -2
- package/src/buildable-body.ts +14 -14
- package/src/claim-cas.ts +4 -4
- package/src/cli-spinner.ts +1 -1
- package/src/cli.ts +472 -141
- package/src/close-job-template.ts +9 -9
- package/src/close-job.ts +26 -26
- package/src/complete.ts +121 -63
- package/src/concurrency.ts +1 -1
- package/src/config.ts +143 -49
- package/src/continue-branch.ts +23 -1
- package/src/cwd-section.ts +1 -1
- package/src/decision-engine.ts +57 -19
- package/src/do-autopick.ts +21 -10
- package/src/do-config.ts +7 -7
- package/src/do-remote-auto.ts +2 -2
- package/src/do.ts +558 -85
- package/src/drop-source.ts +2 -2
- package/src/env-config.ts +19 -11
- package/src/failure-cause.ts +30 -1
- package/src/format.ts +13 -33
- package/src/frontmatter.ts +55 -35
- package/src/gc.ts +172 -9
- package/src/github.ts +78 -0
- package/src/harness.ts +25 -0
- package/src/index.ts +10 -0
- package/src/install-ci-branch-protection.ts +283 -58
- 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 +34 -7
- package/src/install-ci-github.ts +87 -1
- package/src/install-ci.ts +4 -4
- package/src/install-skills.ts +166 -0
- 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 +18 -18
- package/src/intake.ts +138 -103
- package/src/integration-core.ts +234 -100
- package/src/integrator.ts +22 -9
- package/src/isolation.ts +13 -4
- package/src/issue-provider.ts +4 -4
- package/src/item-lock.ts +505 -361
- 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 +137 -152
- package/src/lifecycle-gather.ts +45 -22
- package/src/lifecycle-pools.ts +71 -13
- package/src/merge-question-surfacer.ts +32 -8
- package/src/migrate-stuck-locks.ts +451 -0
- package/src/mint-adr.ts +4 -4
- package/src/mirror-pool-scan.ts +5 -5
- package/src/needs-attention.ts +877 -104
- package/src/orphan-sidecar.ts +49 -8
- package/src/pi-harness.ts +82 -2
- package/src/placement.ts +8 -8
- package/src/prd-to-spec.ts +13 -5
- package/src/prompt.ts +20 -25
- package/src/readiness.ts +1 -1
- package/src/reap-branches.ts +38 -14
- package/src/recover-isolated.ts +18 -1
- package/src/repo-config.ts +66 -17
- package/src/repo-mirror.ts +23 -1
- package/src/review-gate.ts +12 -11
- package/src/review-verdict.ts +3 -3
- package/src/run.ts +69 -23
- package/src/scan.ts +36 -22
- package/src/select-order.ts +1 -1
- package/src/select-priority.ts +15 -15
- package/src/sidecar-apply.ts +1 -1
- package/src/sidecar.ts +141 -14
- package/src/slug-namespace.ts +10 -10
- package/src/spec-complete.ts +4 -5
- package/src/start.ts +57 -63
- package/src/status.ts +7 -7
- package/src/surface-gate.ts +12 -5
- package/src/surface-persist.ts +3 -3
- package/src/tasker-review-loop.ts +18 -17
- package/src/tasking-eligibility.ts +21 -21
- package/src/tasking-lock.ts +75 -60
- package/src/tasking.ts +381 -135
- package/src/triage-gate.ts +1 -1
- package/src/triage-persist.ts +71 -27
- package/src/vendor/incur/LICENSE +21 -0
- package/src/vendor/incur/README.md +19 -0
- package/src/vendor/incur/agents.ts +392 -0
- package/src/verify-workflow-template.ts +3 -3
- package/src/watch-session.ts +102 -7
- package/src/work-layout.ts +14 -9
- package/src/workspace.ts +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `install-ci` ADVANCE-LIFECYCLE capability (
|
|
2
|
+
* The `install-ci` ADVANCE-LIFECYCLE capability (spec `runner-in-ci`, task
|
|
3
3
|
* `install-ci-advance-lifecycle-workflow`; capability C: auto-triage observations
|
|
4
4
|
* + surface declared blockers + apply committed answers). This module GENERATES
|
|
5
5
|
* the advance-lifecycle workflow by ABSORBING and PARAMETERISING the existing seed
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
* each leg carries `--propose` so it can NEVER merge to `main`); `merge` ⇒ ALSO
|
|
44
44
|
* a MATRIX (one leg per item; build/gate/review fan out, the LAND tail is
|
|
45
45
|
* serialised by the engine's `mergeRetries` CAS-retry loop — the git-alone
|
|
46
|
-
* floor — NOT by the workflow shape;
|
|
46
|
+
* floor — NOT by the workflow shape; SPEC
|
|
47
47
|
* `land-time-reverify-and-parallel-merge-ceiling`). This is integration-mode
|
|
48
48
|
* behaviour, IDENTICAL to the build tick (integration mode is
|
|
49
49
|
* verb-independent).
|
|
@@ -101,7 +101,7 @@ export function generateAdvanceLifecycleWorkflow(
|
|
|
101
101
|
const setupWith = providerSecretsWithBlock(config);
|
|
102
102
|
return `\
|
|
103
103
|
# dorfl — the ADVANCE LIFECYCLE loop in CI (capability C: auto-triage
|
|
104
|
-
# observations + surface declared blockers + apply committed answers,
|
|
104
|
+
# observations + surface declared blockers + apply committed answers, spec
|
|
105
105
|
# runner-in-ci). EMITTED by \`dorfl install-ci\` by PARAMETERISING the seed
|
|
106
106
|
# \`docs/ci/advance-loop.yml.template\` (the advance-loop capability's output) — the
|
|
107
107
|
# human commits it. DO NOT hand-edit a copy — re-run install-ci to upgrade the
|
|
@@ -127,7 +127,7 @@ export function generateAdvanceLifecycleWorkflow(
|
|
|
127
127
|
# * merge ⇒ ALSO a MATRIX (one leg per item; build/gate/review fan out, the
|
|
128
128
|
# LAND tail — rebase + CAS push to \`main\` — is serialised by the
|
|
129
129
|
# engine's \`mergeRetries\` CAS-retry loop, NOT by the workflow shape.
|
|
130
|
-
#
|
|
130
|
+
# SPEC \`land-time-reverify-and-parallel-merge-ceiling\`: a
|
|
131
131
|
# non-fast-forward push triggers re-rebase + re-gate + retry, never
|
|
132
132
|
# a \`--force\`. The cross-job serialiser is the CAS-retry FLOOR;
|
|
133
133
|
# there is NO host-specific \`concurrency:\` group on the merge job).
|
|
@@ -284,8 +284,19 @@ jobs:
|
|
|
284
284
|
outputs:
|
|
285
285
|
items: \${{ steps.scan.outputs.items }}
|
|
286
286
|
any: \${{ steps.scan.outputs.any }}
|
|
287
|
+
# Dynamic GitHub-backstop cap (spec
|
|
288
|
+
# \`graceful-pre-timeout-wip-checkpoint\`): the agent-leg jobs
|
|
289
|
+
# (advance-propose / advance-merge) read this as their
|
|
290
|
+
# \`timeout-minutes\` — replacing the retired static
|
|
291
|
+
# \`legTimeoutMinutes\`. Computed at run time from the committed
|
|
292
|
+
# \`dorfl.json\` (via \`dorfl config --json\`) as
|
|
293
|
+
# \`agentDeadlineMinutes + checkpointHeadroomMinutes\`, so an edit to
|
|
294
|
+
# \`dorfl.json\` reflects EVERYWHERE (the internal deadline the legs
|
|
295
|
+
# honour AND this GitHub cap) on the NEXT tick — no \`install-ci\`
|
|
296
|
+
# re-run, no baked-in YAML number.
|
|
297
|
+
githubTimeout: \${{ steps.timeout.outputs.githubTimeout }}
|
|
287
298
|
steps:
|
|
288
|
-
- uses: actions/checkout@
|
|
299
|
+
- uses: actions/checkout@v5
|
|
289
300
|
with:
|
|
290
301
|
fetch-depth: 0
|
|
291
302
|
- uses: ./.github/actions/dorfl-setup
|
|
@@ -329,6 +340,22 @@ jobs:
|
|
|
329
340
|
else
|
|
330
341
|
echo "any=false" >> "$GITHUB_OUTPUT"
|
|
331
342
|
fi
|
|
343
|
+
- id: timeout
|
|
344
|
+
# Dynamic GitHub-backstop cap (spec
|
|
345
|
+
# \`graceful-pre-timeout-wip-checkpoint\` — step 5): read the committed
|
|
346
|
+
# \`dorfl.json\` via \`dorfl config --json\` (in-place, so the resolution
|
|
347
|
+
# chain reads THIS repo's file exactly like \`scan --here\`), and emit
|
|
348
|
+
# \`githubTimeout = agentDeadlineMinutes + checkpointHeadroomMinutes\` as
|
|
349
|
+
# a job OUTPUT the agent-leg jobs consume via
|
|
350
|
+
# \`timeout-minutes: \${{ needs.enumerate.outputs.githubTimeout }}\`. So
|
|
351
|
+
# the SAME committed config drives BOTH the legs' internal deadline AND
|
|
352
|
+
# this GitHub cap — edit + commit, next tick uses it for both, no
|
|
353
|
+
# \`install-ci\` re-run, no baked YAML number. \`dorfl.json\` is the
|
|
354
|
+
# single source read at run time by BOTH consumers.
|
|
355
|
+
run: |
|
|
356
|
+
cap="$(dorfl config --json \\
|
|
357
|
+
| jq '.agentDeadlineMinutes + .checkpointHeadroomMinutes')"
|
|
358
|
+
echo "githubTimeout=\${cap}" >> "$GITHUB_OUTPUT"
|
|
332
359
|
|
|
333
360
|
# ── PROPOSE: a MATRIX of independent jobs (one PR per item) ──────────────────
|
|
334
361
|
# True parallelism — each item is an independent PR, so a matrix is the right
|
|
@@ -340,6 +367,20 @@ jobs:
|
|
|
340
367
|
needs: enumerate
|
|
341
368
|
if: \${{ (github.event.inputs.integrationMode || 'propose') == 'propose' && needs.enumerate.outputs.any == 'true' }}
|
|
342
369
|
runs-on: ubuntu-latest
|
|
370
|
+
# Per-leg wall-clock cap: the DYNAMIC GitHub backstop the enumerate job
|
|
371
|
+
# emits (spec \`graceful-pre-timeout-wip-checkpoint\`), computed at run
|
|
372
|
+
# time from the committed \`dorfl.json\` as
|
|
373
|
+
# \`agentDeadlineMinutes + checkpointHeadroomMinutes\`. It is a STRICTLY
|
|
374
|
+
# LARGER backstop than the dorfl-internal deadline the leg self-stops at
|
|
375
|
+
# (which SAVES its WIP + auto-continues on the next tick), so the GitHub
|
|
376
|
+
# SIGKILL only fires if the graceful save itself wedges. Editing
|
|
377
|
+
# \`dorfl.json\` flips BOTH the internal deadline AND this cap on the
|
|
378
|
+
# next tick — no \`install-ci\` re-run, no baked-in YAML number.
|
|
379
|
+
# A job output is always a STRING; \`timeout-minutes\` needs an INTEGER, so
|
|
380
|
+
# coerce it with \`fromJson(...)\` (the same pattern the \`item\` matrix uses).
|
|
381
|
+
# A raw \`\${{ ... }}\` substitution makes GitHub reject it ("Unexpected
|
|
382
|
+
# value '45'").
|
|
383
|
+
timeout-minutes: \${{ fromJson(needs.enumerate.outputs.githubTimeout) }}
|
|
343
384
|
strategy:
|
|
344
385
|
# Independent PRs: one failing item must NOT cancel the others.
|
|
345
386
|
fail-fast: false
|
|
@@ -352,7 +393,7 @@ jobs:
|
|
|
352
393
|
matrix:
|
|
353
394
|
item: \${{ fromJson(needs.enumerate.outputs.items) }}
|
|
354
395
|
steps:
|
|
355
|
-
- uses: actions/checkout@
|
|
396
|
+
- uses: actions/checkout@v5
|
|
356
397
|
with:
|
|
357
398
|
fetch-depth: 0
|
|
358
399
|
- uses: ./.github/actions/dorfl-setup${setupWith}
|
|
@@ -389,7 +430,7 @@ jobs:
|
|
|
389
430
|
run: dorfl advance "\${{ matrix.item }}" --propose --watch --arbiter origin
|
|
390
431
|
|
|
391
432
|
# ── MERGE: a MATRIX of independent jobs (parallel build/gate/review, serialised land) ──
|
|
392
|
-
#
|
|
433
|
+
# SPEC \`land-time-reverify-and-parallel-merge-ceiling\` (stories 4 + 6): each item
|
|
393
434
|
# gets its own leg; build/gate/review run concurrently across siblings; the LAND
|
|
394
435
|
# TAIL is serialised by the engine's \`mergeRetries\` CAS-retry loop — the
|
|
395
436
|
# git-alone floor — NOT by the workflow shape. A non-fast-forward push triggers
|
|
@@ -403,6 +444,10 @@ jobs:
|
|
|
403
444
|
needs: enumerate
|
|
404
445
|
if: \${{ (github.event.inputs.integrationMode || 'propose') == 'merge' && needs.enumerate.outputs.any == 'true' }}
|
|
405
446
|
runs-on: ubuntu-latest
|
|
447
|
+
# Per-leg wall-clock cap: the DYNAMIC GitHub backstop the enumerate job
|
|
448
|
+
# emits (see advance-propose for the rationale). \`fromJson(...)\` coerces the
|
|
449
|
+
# string job output to the INTEGER \`timeout-minutes\` requires.
|
|
450
|
+
timeout-minutes: \${{ fromJson(needs.enumerate.outputs.githubTimeout) }}
|
|
406
451
|
strategy:
|
|
407
452
|
# Independent landings: one failing item must NOT cancel the others; a
|
|
408
453
|
# loser of the CAS race re-rebases + re-gates + retries.
|
|
@@ -413,7 +458,7 @@ jobs:
|
|
|
413
458
|
matrix:
|
|
414
459
|
item: \${{ fromJson(needs.enumerate.outputs.items) }}
|
|
415
460
|
steps:
|
|
416
|
-
- uses: actions/checkout@
|
|
461
|
+
- uses: actions/checkout@v5
|
|
417
462
|
with:
|
|
418
463
|
fetch-depth: 0
|
|
419
464
|
- uses: ./.github/actions/dorfl-setup${setupWith}
|
|
@@ -463,7 +508,7 @@ jobs:
|
|
|
463
508
|
if: \${{ (github.event.inputs.sweepMergedBranches || 'true') == 'true' }}
|
|
464
509
|
runs-on: ubuntu-latest
|
|
465
510
|
steps:
|
|
466
|
-
- uses: actions/checkout@
|
|
511
|
+
- uses: actions/checkout@v5
|
|
467
512
|
with:
|
|
468
513
|
fetch-depth: 0
|
|
469
514
|
- uses: ./.github/actions/dorfl-setup
|
|
@@ -573,7 +618,7 @@ export function validateAdvanceLifecycleWorkflow(
|
|
|
573
618
|
'dispatch mode).');
|
|
574
619
|
|
|
575
620
|
// --- merge ⇒ a MATRIX per item (parallel build/gate/review, serialised land) -
|
|
576
|
-
//
|
|
621
|
+
// SPEC `land-time-reverify-and-parallel-merge-ceiling` stories 4 + 6: build/
|
|
577
622
|
// gate/review fan out; the LAND tail is serialised by the engine's
|
|
578
623
|
// `mergeRetries` CAS-retry loop (the git-alone floor), NOT the workflow.
|
|
579
624
|
require('merge-matrix', /advance-merge:[\s\S]*?strategy:\s*[\s\S]*?matrix:/.test(
|
|
@@ -690,7 +735,7 @@ export function validateAdvanceLifecycleWorkflow(
|
|
|
690
735
|
text,
|
|
691
736
|
), 'the `sweepMergedBranches` dispatch input (capability F, opt-out) must be ' +
|
|
692
737
|
'preserved.');
|
|
693
|
-
// The ORPHAN-SIDECAR reap (
|
|
738
|
+
// The ORPHAN-SIDECAR reap (spec
|
|
694
739
|
// `agentic-question-resolution-retire-disposition-vocabulary`, US #10) rides
|
|
695
740
|
// the SAME scheduled `dorfl gc --remote-branches` invocation, so it provably
|
|
696
741
|
// FIRES on the cron tick (not behind an un-passed flag). The reap step that
|
|
@@ -745,7 +790,7 @@ export function validateAdvanceLifecycleWorkflow(
|
|
|
745
790
|
// --- The propose `enumerate` matrix must UNION taskable prds --------------
|
|
746
791
|
// (`ci-propose-matrix-must-enumerate-sliceable-prds-not-only-slices`): a
|
|
747
792
|
// task-only `jq` would render `DORFL_AUTO_TASK: 'true'` dead on the
|
|
748
|
-
// hourly cron — a ready ungated
|
|
793
|
+
// hourly cron — a ready ungated SPEC would never become a matrix leg. The `jq`
|
|
749
794
|
// must enumerate `spec:<slug>` ids from `scan --json`'s taskable-SPEC pool
|
|
750
795
|
// (`repos[].specs[]` + `cwd.repo.specs[]`) alongside the eligible-task legs.
|
|
751
796
|
require('propose-enumerates-taskable-specs', /"spec:" \+ \.slug/.test(text) &&
|
|
@@ -760,7 +805,7 @@ export function validateAdvanceLifecycleWorkflow(
|
|
|
760
805
|
// --- The propose `enumerate` matrix must UNION the LIFECYCLE pools ----------
|
|
761
806
|
// (`ci-propose-matrix-enumerates-lifecycle-items`): a build/task-only `jq`
|
|
762
807
|
// runs the answer-loop ONLY in merge mode — a `needsAnswers` item is
|
|
763
|
-
// `eligible:false` and untriaged observations are not in the task/
|
|
808
|
+
// `eligible:false` and untriaged observations are not in the task/spec pools at
|
|
764
809
|
// all, so NO lifecycle rung (triage/surface/apply) ever gets a propose leg. The
|
|
765
810
|
// `jq` must enumerate the three lifecycle sub-pools from `scan --json`
|
|
766
811
|
// (`repos[].lifecycle.*` + `cwd.repo.lifecycle.*`): `triage[]` → `obs:<slug>`,
|
|
@@ -781,6 +826,46 @@ export function validateAdvanceLifecycleWorkflow(
|
|
|
781
826
|
'not only in merge mode ' +
|
|
782
827
|
'(`ci-propose-matrix-enumerates-lifecycle-items`).');
|
|
783
828
|
|
|
829
|
+
// --- DYNAMIC GitHub backstop (spec `graceful-pre-timeout-wip-checkpoint`) ---
|
|
830
|
+
// The agent-leg jobs (advance-propose / advance-merge) must consume the
|
|
831
|
+
// enumerate job's dynamic `githubTimeout` output, NOT a baked-in number. This
|
|
832
|
+
// closes the drift where the static `legTimeoutMinutes` render only refreshed
|
|
833
|
+
// on `install-ci` re-run; now the same committed `dorfl.json` drives BOTH the
|
|
834
|
+
// internal deadline AND the GitHub cap on every tick.
|
|
835
|
+
require('enumerate-emits-github-timeout-output', /enumerate:[\s\S]*?outputs:[\s\S]*?githubTimeout:/.test(
|
|
836
|
+
text,
|
|
837
|
+
), 'the `enumerate` job must declare a `githubTimeout` job OUTPUT (computed ' +
|
|
838
|
+
'from the committed `dorfl.json` as ' +
|
|
839
|
+
'`agentDeadlineMinutes + checkpointHeadroomMinutes`).');
|
|
840
|
+
require('enumerate-reads-dorfl-config-json', /dorfl config --json/.test(
|
|
841
|
+
text,
|
|
842
|
+
), 'the `enumerate` job must read the committed config via ' +
|
|
843
|
+
'`dorfl config --json` at run time (so an edit to `dorfl.json` ' +
|
|
844
|
+
'reflects on the next tick without an `install-ci` re-run).');
|
|
845
|
+
require('enumerate-computes-deadline-plus-headroom', /agentDeadlineMinutes \+ checkpointHeadroomMinutes/.test(
|
|
846
|
+
text,
|
|
847
|
+
), 'the `enumerate` job must compute `githubTimeout` as ' +
|
|
848
|
+
'`agentDeadlineMinutes + checkpointHeadroomMinutes` (the backstop is ' +
|
|
849
|
+
'DELIBERATELY head-room above the internal deadline).');
|
|
850
|
+
require('propose-uses-dynamic-github-timeout', /advance-propose:[\s\S]*?timeout-minutes:\s*\$\{\{\s*fromJson\(needs\.enumerate\.outputs\.githubTimeout\)\s*\}\}/.test(
|
|
851
|
+
text,
|
|
852
|
+
), 'the `advance-propose` job must set `timeout-minutes: ${{ ' +
|
|
853
|
+
'fromJson(needs.enumerate.outputs.githubTimeout) }}` (the DYNAMIC GitHub ' +
|
|
854
|
+
'backstop, fromJson-coerced to an integer, not a baked-in number).');
|
|
855
|
+
require('merge-uses-dynamic-github-timeout', /advance-merge:[\s\S]*?timeout-minutes:\s*\$\{\{\s*fromJson\(needs\.enumerate\.outputs\.githubTimeout\)\s*\}\}/.test(
|
|
856
|
+
text,
|
|
857
|
+
), 'the `advance-merge` job must set `timeout-minutes: ${{ ' +
|
|
858
|
+
'fromJson(needs.enumerate.outputs.githubTimeout) }}` (the DYNAMIC GitHub ' +
|
|
859
|
+
'backstop, fromJson-coerced to an integer).');
|
|
860
|
+
// A baked static `timeout-minutes: <number>` on an agent-leg job is the
|
|
861
|
+
// retired `legTimeoutMinutes` render — forbid it so a future edit cannot
|
|
862
|
+
// silently re-introduce the drift the dynamic backstop is fixing.
|
|
863
|
+
require('no-static-agent-leg-timeout', !/(?:advance-propose|advance-merge):[\s\S]*?timeout-minutes:\s*\d/.test(
|
|
864
|
+
text,
|
|
865
|
+
), 'no agent-leg job may set a baked-in numeric `timeout-minutes` ' +
|
|
866
|
+
'(the retired `legTimeoutMinutes` render); the GitHub backstop is ' +
|
|
867
|
+
'DYNAMIC (read from `dorfl.json` at run time).');
|
|
868
|
+
|
|
784
869
|
// --- Wires the SHARED composite setup action -------------------------------
|
|
785
870
|
require('uses-shared-setup-action', /uses:\s*\.\/\.github\/actions\/dorfl-setup\b/.test(
|
|
786
871
|
text,
|
|
@@ -26,7 +26,7 @@ import type {
|
|
|
26
26
|
} from './run.js';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* The **`advance` LOOP DRIVER** (
|
|
29
|
+
* The **`advance` LOOP DRIVER** (spec `advance-loop`, task
|
|
30
30
|
* `advance-drivers-and-gates`, US #7/22/26/31) — the second of the two drivers
|
|
31
31
|
* over the substrate-agnostic advance TICK. Where the one-shot driver
|
|
32
32
|
* (`advance-drivers.ts`) runs the tick over named item(s) SEQUENTIALLY, this
|
|
@@ -113,7 +113,7 @@ export interface AdvanceOnceOptions {
|
|
|
113
113
|
|
|
114
114
|
/** One advanced item's result + the identity it was for (input order preserved). */
|
|
115
115
|
export interface AdvanceBatchItem {
|
|
116
|
-
/** The namespaced arg the tick was run on (`
|
|
116
|
+
/** The namespaced arg the tick was run on (`spec:<slug>` / bare slug). */
|
|
117
117
|
arg: string;
|
|
118
118
|
/** The tick's result, or a captured throw mapped to a usage-error result. */
|
|
119
119
|
result: AdvanceResult;
|
|
@@ -549,7 +549,7 @@ export interface AdvanceRunTickDeps extends Omit<
|
|
|
549
549
|
* Adapt the {@link advanceOnce} LOOP DRIVER to the {@link RunTick} swap SEAM so
|
|
550
550
|
* `run` (≡ CI, US #7) drives the ADVANCE tick over the mirror-side eligible pool
|
|
551
551
|
* instead of the build tick. `run.ts` deliberately writes {@link runLoop} against
|
|
552
|
-
* {@link RunTick} (NOT against `runOnce`) precisely so the advance-loop
|
|
552
|
+
* {@link RunTick} (NOT against `runOnce`) precisely so the advance-loop spec can
|
|
553
553
|
* swap the tick WITHOUT re-architecting the loop — this is that swap.
|
|
554
554
|
*
|
|
555
555
|
* The seam is `(RunOnceOptions) => Promise<RunOnceResult>`; one advance batch is
|
|
@@ -34,7 +34,7 @@ import {runAsync} from './git.js';
|
|
|
34
34
|
*
|
|
35
35
|
* **C2 rebase-until-real-conflict (task `c2-rebase-until-real-on-durable-main-
|
|
36
36
|
* promotions`).** This same `HEAD:main` push carries the won't-proceed terminal
|
|
37
|
-
* `tasks/ready → tasks/cancelled` / `
|
|
37
|
+
* `tasks/ready → tasks/cancelled` / `specs/ready → specs/dropped` (slug-RELOCATION
|
|
38
38
|
* family) when `apply-persist.ts` resolves a `dropped` disposition; under sustained
|
|
39
39
|
* parallel load on the shared `main` ref two DIFFERENT items' concurrent promotions
|
|
40
40
|
* can falsely-contend even though nothing tree-conflicts, exhausting a small fixed
|
|
@@ -92,6 +92,31 @@ export interface PushTreelessResultParams {
|
|
|
92
92
|
*/
|
|
93
93
|
export const DEFAULT_TREELESS_JITTER_MS = 25;
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Stderr signatures of a PERMANENT push rejection that NO re-fetch+rebase can
|
|
97
|
+
* ever cure, so the retry loop MUST stop at once instead of burning the whole
|
|
98
|
+
* liveness ceiling ({@link PushTreelessResultParams.retries}, `1000` in prod) on
|
|
99
|
+
* identical round-trips.
|
|
100
|
+
*
|
|
101
|
+
* The tree-less rungs publish by a DIRECT `git push HEAD:main` of a freshly-made
|
|
102
|
+
* commit (see the module header). If the arbiter's `main` hard-requires a status
|
|
103
|
+
* check on EVERY push (GitHub classic branch protection with a non-empty
|
|
104
|
+
* `required_status_checks.contexts`, or a `pre-receive`/ruleset hook), that fresh
|
|
105
|
+
* commit is rejected with `GH006 ... Required status check "..." is expected` /
|
|
106
|
+
* `protected branch hook declined` / `pre-receive hook declined`. A rebase onto
|
|
107
|
+
* the newest `main` does NOT change the fact that the pushed commit has no green
|
|
108
|
+
* check, so retrying is pointless: the push is rejected identically every time.
|
|
109
|
+
*
|
|
110
|
+
* This is DISTINCT from a fast-forward RACE (`non-fast-forward` / `fetch first` /
|
|
111
|
+
* `stale info`), which a rebase DOES cure — and it must win OVER the broad
|
|
112
|
+
* `rejected` contention alternation, because a protected-branch rejection
|
|
113
|
+
* literally contains the word `rejected` (`! [remote rejected] HEAD -> main
|
|
114
|
+
* (protected branch hook declined)`) and would otherwise be mis-read as a race
|
|
115
|
+
* and retried uselessly. See the observation trail for the live incident.
|
|
116
|
+
*/
|
|
117
|
+
export const PERMANENT_PUSH_REJECTION =
|
|
118
|
+
/GH006|protected branch|hook declined|required status check|cannot force-update the branch/i;
|
|
119
|
+
|
|
95
120
|
function sleepMs(ms: number): Promise<void> {
|
|
96
121
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
97
122
|
}
|
|
@@ -118,6 +143,26 @@ export async function pushTreelessResult(
|
|
|
118
143
|
if (push.status === 0) {
|
|
119
144
|
return;
|
|
120
145
|
}
|
|
146
|
+
// A PERMANENT rejection (branch protection / required status check / a
|
|
147
|
+
// pre-receive or ruleset hook) can NEVER be cured by a rebase+re-push — the
|
|
148
|
+
// fresh commit still carries no green check — so stop AT ONCE with an honest,
|
|
149
|
+
// distinct note instead of exhausting the liveness ceiling on identical
|
|
150
|
+
// round-trips. This MUST be checked before `contended`, because a protected-
|
|
151
|
+
// branch rejection contains the word `rejected` and would otherwise be
|
|
152
|
+
// mistaken for a fast-forward race and retried uselessly (see the incident
|
|
153
|
+
// observation).
|
|
154
|
+
if (PERMANENT_PUSH_REJECTION.test(push.stderr)) {
|
|
155
|
+
note(
|
|
156
|
+
`advance: the arbiter's \`main\` rejected the direct tree-less push ` +
|
|
157
|
+
`(${push.stderr.trim() || 'protected branch'}); a re-fetch+rebase cannot ` +
|
|
158
|
+
`cure a required-status-check / protected-branch rule on a direct push, so ` +
|
|
159
|
+
`the work is saved in the working clone for the next pass / a human. ` +
|
|
160
|
+
`Reconcile \`main\`'s protection so direct tree-less ledger writes are ` +
|
|
161
|
+
`allowed (the required check belongs in a ruleset with ` +
|
|
162
|
+
`\`do_not_enforce_on_create\`, not the classic on-every-push gate).`,
|
|
163
|
+
);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
121
166
|
const contended = /non-fast-forward|rejected|fetch first|stale info/i.test(
|
|
122
167
|
push.stderr,
|
|
123
168
|
);
|