@defrex/autobuild 1.0.1 → 1.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/README.md +10 -18
- package/SPEC.md +499 -238
- package/bin/ab-dispatch-generation.ts +11 -2
- package/docs/accounts.md +119 -0
- package/docs/agent-runtimes.md +4 -4
- package/docs/answering-blocked-builds.md +2 -2
- package/docs/architecture.md +262 -53
- package/docs/assets/headline-wide.png +0 -0
- package/docs/build-store.md +3 -41
- package/docs/builds.md +4 -4
- package/docs/cli.md +18 -4
- package/docs/configuration-overview.md +115 -4
- package/docs/configuration.md +488 -334
- package/docs/dispatcher-hosting.md +19 -34
- package/docs/dispatcher.md +1 -1
- package/docs/forges.md +5 -5
- package/docs/getting-started.md +2 -2
- package/docs/glossary.md +6 -6
- package/docs/intake.md +2 -0
- package/docs/integration-overview.md +15 -15
- package/docs/integration-tree.md +45 -38
- package/docs/integration.md +6 -6
- package/{skills/guide/references/landing-policy.md → docs/merge-policy.md} +40 -24
- package/docs/migration-1.0.md +17 -13
- package/docs/operating.md +41 -19
- package/docs/operator-api.md +180 -51
- package/docs/operator-surfaces.md +5 -18
- package/docs/overview.md +3 -3
- package/docs/plugin-authoring.md +21 -0
- package/docs/remote-store-protocol.md +242 -68
- package/docs/remote-ticket-protocol.md +30 -50
- package/docs/restacking.md +54 -15
- package/docs/seams.md +8 -8
- package/docs/setup.md +59 -119
- package/docs/skills.md +1 -1
- package/docs/spec-standard.md +6 -6
- package/docs/ticket-dependencies.md +7 -7
- package/docs/ticket-sources.md +18 -0
- package/docs/tickets.md +8 -2
- package/docs/troubleshooting.md +8 -12
- package/docs/upgrading.md +9 -4
- package/docs/verification.md +60 -14
- package/docs/workspaces.md +4 -4
- package/package.json +17 -6
- package/packages/core/src/accounts/chatgpt-oauth.ts +216 -0
- package/packages/core/src/accounts/chatgpt-state.ts +41 -0
- package/packages/core/src/accounts/local-credentials.ts +194 -0
- package/packages/core/src/accounts/local-inference.ts +106 -0
- package/packages/core/src/accounts/local-owner.ts +123 -0
- package/packages/core/src/accounts/sensitive.ts +2 -0
- package/packages/core/src/cli/accounts.ts +147 -0
- package/packages/core/src/cli/binary-direct.ts +13 -1
- package/packages/core/src/cli/binary-lifecycle.ts +65 -2
- package/packages/core/src/cli/binary.ts +3 -1
- package/packages/core/src/cli/build-control.ts +83 -28
- package/packages/core/src/cli/connect.ts +3 -3
- package/packages/core/src/cli/context.ts +81 -38
- package/packages/core/src/cli/dashboard/facts.ts +2 -1
- package/packages/core/src/cli/dashboard/integration-detail.ts +8 -8
- package/packages/core/src/cli/dashboard/integration-row.ts +40 -13
- package/packages/core/src/cli/dashboard/landing-display.ts +25 -0
- package/packages/core/src/cli/dashboard/model.ts +56 -33
- package/packages/core/src/cli/dashboard/poll.ts +9 -3
- package/packages/core/src/cli/dashboard/render.ts +59 -37
- package/packages/core/src/cli/dashboard/target-distance.ts +14 -0
- package/packages/core/src/cli/dashboard/tree.ts +3 -2
- package/packages/core/src/cli/dispatch-args.ts +1 -1
- package/packages/core/src/cli/dispatch-frontend.ts +6 -3
- package/packages/core/src/cli/dispatch-handoff.ts +125 -44
- package/packages/core/src/cli/dispatch-launch-contract.ts +187 -0
- package/packages/core/src/cli/dispatch-launcher.ts +54 -21
- package/packages/core/src/cli/dispatch-preflight.ts +6 -1
- package/packages/core/src/cli/dispatch.ts +106 -11
- package/packages/core/src/cli/env.ts +4 -0
- package/packages/core/src/cli/help.ts +46 -23
- package/packages/core/src/cli/init-readiness-remote.ts +22 -1
- package/packages/core/src/cli/init-readiness-shared.ts +5 -1
- package/packages/core/src/cli/init-validation.ts +160 -18
- package/packages/core/src/cli/main.ts +68 -8
- package/packages/core/src/cli/node-verification-provenance.ts +1 -97
- package/packages/core/src/cli/publication-settlement.ts +47 -21
- package/packages/core/src/cli/repository-status.ts +20 -9
- package/packages/core/src/cli/secrets.ts +173 -0
- package/packages/core/src/cli/status.ts +42 -5
- package/packages/core/src/cli/store-opening.ts +17 -2
- package/packages/core/src/cli/terminal.ts +22 -1
- package/packages/core/src/cli/terminals.ts +14 -10
- package/packages/core/src/cli/upgrade-agent.ts +9 -1
- package/packages/core/src/cli/upgrade-landing.ts +70 -30
- package/packages/core/src/cli/upgrade.ts +3 -1
- package/packages/core/src/cli/wait.ts +15 -7
- package/packages/core/src/cli/watch-lifetime.ts +111 -0
- package/packages/core/src/cli/watch.ts +635 -510
- package/packages/core/src/config/accounts.ts +101 -0
- package/packages/core/src/config/effective-artifact.fixture.ts +27 -0
- package/packages/core/src/config/effective-artifact.ts +13 -0
- package/packages/core/src/config/landing.ts +1 -1
- package/packages/core/src/config/live.ts +14 -1
- package/packages/core/src/config/load.ts +21 -1
- package/packages/core/src/config/pipeline-source.ts +28 -0
- package/packages/core/src/config/reference-metadata.ts +2 -0
- package/packages/core/src/config/reference.ts +22 -7
- package/packages/core/src/config/roles.ts +54 -3
- package/packages/core/src/config/schema.ts +146 -162
- package/packages/core/src/context-directory.ts +26 -0
- package/packages/core/src/distribution-packaging.ts +26 -5
- package/packages/core/src/events/catalog.ts +10 -2
- package/packages/core/src/events/compatibility.ts +2 -1
- package/packages/core/src/events/globs.ts +1 -1
- package/packages/core/src/events/payloads.ts +73 -1
- package/packages/core/src/events/policy.ts +7 -0
- package/packages/core/src/events/repository.ts +4 -4
- package/packages/core/src/events/sessions.ts +6 -6
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +574 -0
- package/packages/core/src/kernel/auto-merge.ts +2 -2
- package/packages/core/src/kernel/engine.ts +255 -26
- package/packages/core/src/kernel/generators/leaf-restack-log.ts +10 -0
- package/packages/core/src/kernel/integration-landing.ts +3 -3
- package/packages/core/src/kernel/integration-state.ts +27 -4
- package/packages/core/src/kernel/leaf-restack-state.ts +28 -3
- package/packages/core/src/kernel/log-index.ts +13 -1
- package/packages/core/src/kernel/node-landing.ts +8 -8
- package/packages/core/src/kernel/node-parent.ts +2 -2
- package/packages/core/src/kernel/node-restack-transaction.ts +1 -1
- package/packages/core/src/kernel/node-verification-context.ts +216 -0
- package/packages/core/src/kernel/phases.ts +1 -1
- package/packages/core/src/kernel/plan-verify-selection.ts +16 -0
- package/packages/core/src/kernel/publication-retry.ts +168 -0
- package/packages/core/src/kernel/reconcile-restack.ts +29 -1
- package/packages/core/src/kernel/reducer.ts +85 -5
- package/packages/core/src/kernel/target-distance.ts +45 -0
- package/packages/core/src/kernel/terminal-guard.ts +10 -1
- package/packages/core/src/kernel/verify-stage-state.ts +123 -0
- package/packages/core/src/kernel/verify-stages.ts +39 -0
- package/packages/core/src/ontology.ts +1 -0
- package/packages/core/src/operator/annotations.ts +6 -0
- package/packages/core/src/operator/control.ts +1 -1
- package/packages/core/src/operator/index.ts +3 -7
- package/packages/core/src/operator/landings.ts +5 -1
- package/packages/core/src/operator/presentation.ts +6 -1
- package/packages/core/src/operator/protocol.ts +6 -0
- package/packages/core/src/operator/query.ts +14 -18
- package/packages/core/src/operator/registry.ts +39 -7
- package/packages/core/src/operator/sandbox-host.ts +64 -40
- package/packages/core/src/operator/sandbox.ts +3 -0
- package/packages/core/src/operator/ticket-source-backend.ts +3 -12
- package/packages/core/src/operator/tickets.ts +25 -4
- package/packages/core/src/plugins/manifest.ts +2 -1
- package/packages/core/src/ports/forge/contract.ts +2 -2
- package/packages/core/src/ports/forge/git-rewrite.ts +25 -2
- package/packages/core/src/ports/forge/github-readiness.ts +2 -2
- package/packages/core/src/ports/forge/github.ts +26 -7
- package/packages/core/src/ports/forge/local-git.ts +4 -4
- package/packages/core/src/ports/forge/readiness.ts +1 -1
- package/packages/core/src/ports/forge-failure.ts +24 -0
- package/packages/core/src/ports/runner/account-env.ts +88 -0
- package/packages/core/src/ports/runner/chatgpt-provider.ts +85 -0
- package/packages/core/src/ports/runner/claude.ts +26 -2
- package/packages/core/src/ports/runner/codex.ts +63 -31
- package/packages/core/src/ports/runner/one-shot.ts +2 -0
- package/packages/core/src/ports/runner/provider-error.ts +5 -0
- package/packages/core/src/ports/runner/routing.ts +35 -4
- package/packages/core/src/ports/tickets/contract.ts +58 -0
- package/packages/core/src/ports/tickets/tree.ts +1 -1
- package/packages/core/src/ports/types.ts +28 -7
- package/packages/core/src/ports/workspace/account-policy.ts +72 -0
- package/packages/core/src/ports/workspace/build-execution.ts +9 -2
- package/packages/core/src/ports/workspace/builtin-capabilities.ts +1 -0
- package/packages/core/src/ports/workspace/create.ts +2 -0
- package/packages/core/src/ports/workspace/git-worktree.ts +6 -1
- package/packages/core/src/ports/workspace/phase-scratch.ts +4 -3
- package/packages/core/src/ports/workspace/provider-capabilities.ts +1 -0
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +182 -72
- package/packages/core/src/processes/build-child.ts +6 -8
- package/packages/core/src/processes/build-execution-state.ts +8 -5
- package/packages/core/src/processes/build-runner.ts +554 -99
- package/packages/core/src/processes/dispatcher.ts +209 -101
- package/packages/core/src/processes/execution-no-progress.ts +8 -1
- package/packages/core/src/processes/execution-settlement.ts +21 -3
- package/packages/core/src/processes/harvest-runner.ts +68 -8
- package/packages/core/src/processes/phase-failure-budget.ts +1 -0
- package/packages/core/src/processes/publication-loss.ts +8 -2
- package/packages/core/src/processes/publication-state.ts +42 -4
- package/packages/core/src/processes/repo-view.ts +14 -0
- package/packages/core/src/processes/verify-cycle-config.ts +96 -0
- package/packages/core/src/project-secrets.ts +105 -0
- package/packages/core/src/{integration → scenarios}/harness.ts +330 -317
- package/packages/core/src/secret-name.ts +41 -0
- package/packages/core/src/store/account-redaction.ts +156 -0
- package/packages/core/src/store/adapter.ts +1 -0
- package/packages/core/src/store/build-scope.ts +9 -0
- package/packages/core/src/store/contract.ts +116 -2
- package/packages/core/src/store/local/schema.ts +13 -0
- package/packages/core/src/store/local/store.ts +42 -0
- package/packages/core/src/store/memory.ts +47 -0
- package/packages/core/src/store/operator-presence.ts +21 -0
- package/packages/core/src/store/phase-session.ts +10 -0
- package/packages/core/src/store/reducer-value-shapes.json +5185 -4156
- package/packages/core/src/store/remote/client.ts +89 -48
- package/packages/core/src/store/remote/compatibility.ts +20 -0
- package/packages/core/src/store/remote/protocol.ts +4 -0
- package/packages/core/src/store/remote/version.ts +3 -1
- package/packages/core/src/store/retention.ts +2 -3
- package/packages/core/src/store/session-handle.ts +9 -0
- package/packages/core/src/store/streams/session-writer.ts +1 -1
- package/packages/core/src/store/types.ts +12 -2
- package/packages/core/src/testing/dispatch-read-budget.ts +122 -0
- package/packages/core/src/testing/index.ts +12 -1
- package/packages/core/src/testing/reduced-read-budget.ts +47 -0
- package/packages/core/src/testing/temp-directories.ts +58 -0
- package/skills/code-review/SKILL.md +23 -9
- package/skills/finalize/SKILL.md +15 -7
- package/skills/guide/SKILL.md +373 -148
- package/skills/guide/references/accounts.md +119 -0
- package/skills/guide/references/integration-tree.md +45 -38
- package/{docs/landing-policy.md → skills/guide/references/merge-policy.md} +40 -24
- package/skills/guide/references/migration-1.0.md +17 -13
- package/skills/guide/references/operator-api.md +180 -51
- package/skills/guide/references/plugin-authoring.md +21 -0
- package/skills/guide/references/remote-store-protocol.md +242 -68
- package/skills/guide/references/remote-ticket-protocol.md +30 -50
- package/skills/guide/references/restacking.md +54 -15
- package/skills/guide/references/setup.md +59 -119
- package/skills/guide/references/spec-standard.md +6 -6
- package/skills/guide/references/ticket-dependencies.md +7 -7
- package/skills/harvest/SKILL.md +3 -1
- package/skills/harvest-review/SKILL.md +3 -1
- package/skills/implement/SKILL.md +43 -17
- package/skills/operate/SKILL.md +118 -118
- package/skills/plan/SKILL.md +39 -13
- package/skills/plan-review/SKILL.md +15 -10
- package/skills/reconcile/SKILL.md +22 -3
- package/skills/spec/SKILL.md +20 -20
- package/skills/tickets/SKILL.md +12 -9
- package/templates/autobuild.toml +1 -1
- package/templates/hosted-service/package.json +2 -2
- package/docs/hosted-dispatcher-cutover-validation.md +0 -178
- package/docs/hosted-dispatcher.md +0 -275
- package/docs/hosted-service.md +0 -293
- package/docs/mcp.md +0 -149
- package/packages/core/src/orchestrator/approvals.ts +0 -115
- package/packages/core/src/orchestrator/conversation.ts +0 -167
- package/packages/core/src/orchestrator/model.ts +0 -86
- package/packages/core/src/orchestrator/prompt.ts +0 -63
- package/packages/core/src/orchestrator/tools.ts +0 -117
- package/packages/core/src/orchestrator/turn-runner.ts +0 -457
- package/packages/core/src/processes/orchestrator-tick.ts +0 -360
|
@@ -68,3 +68,28 @@ export function nodeLandingRuleDisplay(
|
|
|
68
68
|
? 'default rule for integration builds: consent'
|
|
69
69
|
: `rule ${rule.index + 1}: ${JSON.stringify(rule.snapshot)}`
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
/** Public merge vocabulary shared by terminal and web renderers. */
|
|
73
|
+
export const mergeVocabulary = {
|
|
74
|
+
title: 'Merge',
|
|
75
|
+
label: 'merge',
|
|
76
|
+
merged: 'merged',
|
|
77
|
+
consent: 'Merge awaits consent. Merge releases this build; Hold keeps it waiting.',
|
|
78
|
+
} as const
|
|
79
|
+
|
|
80
|
+
export function mergeSummary(build: {
|
|
81
|
+
landing?: BuildState['landing']
|
|
82
|
+
autoMerge: string
|
|
83
|
+
}): string {
|
|
84
|
+
const landing = build.landing
|
|
85
|
+
const status =
|
|
86
|
+
landing?.command?.kind === 'hold'
|
|
87
|
+
? 'held'
|
|
88
|
+
: landing?.decision?.mode === 'consent' && landing.command?.kind !== 'land'
|
|
89
|
+
? 'awaiting consent'
|
|
90
|
+
: build.autoMerge
|
|
91
|
+
return `${mergeVocabulary.label} ${status}`
|
|
92
|
+
}
|
|
93
|
+
export function mergedChildren(merged: number, total: number): string {
|
|
94
|
+
return `${merged}/${total} ${mergeVocabulary.merged}`
|
|
95
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { workTargetDistance } from './target-distance'
|
|
1
2
|
import { migrationIdentity, ticketMigrationsReducer } from '../../kernel/ticket-migrations'
|
|
2
3
|
import { projectRollback, type DashboardRollback } from './rollback'
|
|
3
4
|
import { dispatchUpgradeReducer, type DispatchUpgradeState } from '../../kernel/dispatch-upgrade'
|
|
@@ -133,6 +134,7 @@ export interface PipelineStep {
|
|
|
133
134
|
* `waiting` annotates merge. Rendered inside the `(…)` note, so outcome
|
|
134
135
|
* distinctions never rely on color alone. */
|
|
135
136
|
qualifier?:
|
|
137
|
+
| 'cancelled'
|
|
136
138
|
| 'failed'
|
|
137
139
|
| 'skipped'
|
|
138
140
|
| 'waiting'
|
|
@@ -193,6 +195,7 @@ export interface DashboardBuild {
|
|
|
193
195
|
}
|
|
194
196
|
tree?: TreeProjection
|
|
195
197
|
kind?: 'integration' | 'work'
|
|
198
|
+
targetDistance?: string
|
|
196
199
|
target?: string
|
|
197
200
|
integration?:
|
|
198
201
|
| 'reparenting'
|
|
@@ -202,11 +205,11 @@ export interface DashboardBuild {
|
|
|
202
205
|
| 'verifying'
|
|
203
206
|
| 'verification failed'
|
|
204
207
|
| 'awaiting consent'
|
|
205
|
-
| 'ready to
|
|
206
|
-
| 'human
|
|
207
|
-
| 'fenced
|
|
208
|
-
| 'unfenced
|
|
209
|
-
| 'unverified
|
|
208
|
+
| 'ready to merge'
|
|
209
|
+
| 'human merge'
|
|
210
|
+
| 'fenced merge'
|
|
211
|
+
| 'unfenced merge'
|
|
212
|
+
| 'unverified merge'
|
|
210
213
|
slug: string
|
|
211
214
|
status: EffectiveStatus
|
|
212
215
|
/** True when the build is BOTH paused and blocked: blocked wins the status
|
|
@@ -436,7 +439,7 @@ export function autoMergeDisplay(state: BuildState): AutoMergeDisplay {
|
|
|
436
439
|
* so the terminal row/detail and the web row/detail say the same words, and
|
|
437
440
|
* so it names the per-build control that unblocks the parked build. */
|
|
438
441
|
export function autoMergeConsentReason(slug: string): string {
|
|
439
|
-
return `
|
|
442
|
+
return `Merge awaits consent — use ab merge ${slug}; use ab hold ${slug} to withdraw consent`
|
|
440
443
|
}
|
|
441
444
|
|
|
442
445
|
/**
|
|
@@ -450,6 +453,7 @@ export function autoMergeConsentReason(slug: string): string {
|
|
|
450
453
|
interface StepExtra {
|
|
451
454
|
producedOutput?: boolean
|
|
452
455
|
qualifier?:
|
|
456
|
+
| 'cancelled'
|
|
453
457
|
| 'failed'
|
|
454
458
|
| 'skipped'
|
|
455
459
|
| 'waiting'
|
|
@@ -613,6 +617,8 @@ export function projectBuildFromFacts(
|
|
|
613
617
|
return {
|
|
614
618
|
slug: record.slug,
|
|
615
619
|
...buildVocabulary(state),
|
|
620
|
+
target: state.target?.ticket.id ?? state.baseBranch ?? config.baseBranch,
|
|
621
|
+
targetDistance: workTargetDistance(state, facts.log.restack),
|
|
616
622
|
tree: projectTree(record, state, facts.log.restack, pipeline.verify.steps),
|
|
617
623
|
integrationRow: projectIntegrationRow(record, state, facts.log.restack, config),
|
|
618
624
|
integrationDetail: projectIntegrationDetail(
|
|
@@ -657,6 +663,9 @@ export function projectBuildFromFacts(
|
|
|
657
663
|
return {
|
|
658
664
|
slug: record.slug,
|
|
659
665
|
...buildVocabulary(state),
|
|
666
|
+
target: state.target?.ticket.id ?? state.baseBranch ?? config.baseBranch,
|
|
667
|
+
targetDistance:
|
|
668
|
+
state.kind === 'node' ? undefined : workTargetDistance(state, facts.log.restack),
|
|
660
669
|
tree: projectTree(record, state, facts.log.restack, pipeline.verify.steps),
|
|
661
670
|
integrationRow: projectIntegrationRow(record, state, facts.log.restack, config),
|
|
662
671
|
integrationDetail: projectIntegrationDetail(
|
|
@@ -761,18 +770,19 @@ export function projectBuildFromFacts(
|
|
|
761
770
|
// already has the log in hand). A running build keeps its open interval live
|
|
762
771
|
// (the renderer ticks it against `now`); a paused build freezes every open
|
|
763
772
|
// interval at its acknowledgement (including while RESUMING), while a
|
|
764
|
-
// blocked build freezes at the latest durable event. Timers
|
|
765
|
-
// advance behind either gate (AC 10). Each step scopes by the SAME seq boundary its state uses, so
|
|
773
|
+
// blocked build freezes at the latest non-distance durable event. Timers do
|
|
774
|
+
// not advance behind either gate (AC 10). Each step scopes by the SAME seq boundary its state uses, so
|
|
766
775
|
// durations and states restart in lockstep (AC 12).
|
|
767
776
|
const intervals = dashboard.intervals
|
|
768
777
|
const pausedAt = state.status === 'paused' ? dashboard.pausedAt : undefined
|
|
778
|
+
const activityAt = facts.log.restack.activityAt ?? state.lastEvent?.ts
|
|
769
779
|
const frozenNow =
|
|
770
780
|
state.status === 'running'
|
|
771
781
|
? undefined
|
|
772
782
|
: pausedAt !== undefined
|
|
773
783
|
? Date.parse(pausedAt)
|
|
774
|
-
:
|
|
775
|
-
? Date.parse(
|
|
784
|
+
: activityAt !== undefined
|
|
785
|
+
? Date.parse(activityAt)
|
|
776
786
|
: undefined
|
|
777
787
|
|
|
778
788
|
// ── Shared derivations ────────────────────────────────────────────────────
|
|
@@ -865,7 +875,10 @@ export function projectBuildFromFacts(
|
|
|
865
875
|
|
|
866
876
|
for (const s of pipeline.verify.steps) {
|
|
867
877
|
const phase = verifyPhase(s)
|
|
868
|
-
const current =
|
|
878
|
+
const current =
|
|
879
|
+
(
|
|
880
|
+
state.verify.running ?? (state.verify.currentStep ? [state.verify.currentStep] : [])
|
|
881
|
+
).includes(s) && activePhase !== undefined
|
|
869
882
|
const stepResults = cycle.filter((r) => r.step === s)
|
|
870
883
|
// The attempt COUNT comes from `currentPhase.attempt` for the running step
|
|
871
884
|
// — the attempt ACTUALLY running (`verify.started` populates it directly),
|
|
@@ -888,12 +901,20 @@ export function projectBuildFromFacts(
|
|
|
888
901
|
steps.push(
|
|
889
902
|
step(phase, !cycleFailed && verifySatisfied(s), current, {
|
|
890
903
|
producedOutput: stepResults.length > 0,
|
|
891
|
-
qualifier:
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
904
|
+
qualifier: Object.values(state.verifyStage.cancellations).some(
|
|
905
|
+
(c) => c.seq > cycleSince && c.step === s,
|
|
906
|
+
)
|
|
907
|
+
? 'cancelled'
|
|
908
|
+
: stepResults.some((r) => r.outcome === 'fail')
|
|
909
|
+
? 'failed'
|
|
910
|
+
: stepResults.some((r) => r.outcome === 'skipped')
|
|
911
|
+
? 'skipped'
|
|
912
|
+
: undefined,
|
|
913
|
+
reason:
|
|
914
|
+
Object.values(state.verifyStage.cancellations)
|
|
915
|
+
.filter((c) => c.seq > cycleSince && c.step === s)
|
|
916
|
+
.map((c) => `not run: cancelled by verify:${c.cause.step}`)
|
|
917
|
+
.at(-1) ?? stepResults.find((r) => r.skipCause === 'post-reconcile-policy')?.reason,
|
|
897
918
|
count,
|
|
898
919
|
timing: timingFor(intervals, phase, cycleSince, frozenNow),
|
|
899
920
|
}),
|
|
@@ -946,11 +967,10 @@ export function projectBuildFromFacts(
|
|
|
946
967
|
verifyDrained &&
|
|
947
968
|
postStepsDrained &&
|
|
948
969
|
activePhase === undefined
|
|
949
|
-
//
|
|
950
|
-
//
|
|
951
|
-
// is exactly when it became merge-ready, ticking like a running phase (AC 9).
|
|
970
|
+
// Advisory distance refreshes must not restart the merge waiting clock.
|
|
971
|
+
// Retain the last lifecycle activity when the engine parks awaiting its PR.
|
|
952
972
|
// Frozen at that same ts when the build is not running.
|
|
953
|
-
const lastMs =
|
|
973
|
+
const lastMs = activityAt === undefined ? 0 : Date.parse(activityAt)
|
|
954
974
|
const mergeTiming: StepTiming | undefined = !mergeCurrent
|
|
955
975
|
? undefined
|
|
956
976
|
: frozenNow !== undefined
|
|
@@ -963,10 +983,10 @@ export function projectBuildFromFacts(
|
|
|
963
983
|
if (mergeCurrent && !landingAuthorized(state.landing)) {
|
|
964
984
|
const reason =
|
|
965
985
|
state.landing?.command?.kind === 'hold'
|
|
966
|
-
? `
|
|
986
|
+
? `Merge held — use ab merge ${record.slug} when ready to release the hold`
|
|
967
987
|
: state.landing?.decision?.mode === 'consent'
|
|
968
988
|
? autoMergeConsentReason(record.slug)
|
|
969
|
-
: '
|
|
989
|
+
: 'Merge policy decision pending'
|
|
970
990
|
steps[steps.length - 1] = { ...steps[steps.length - 1]!, reason }
|
|
971
991
|
}
|
|
972
992
|
|
|
@@ -995,6 +1015,9 @@ export function projectBuildFromFacts(
|
|
|
995
1015
|
return {
|
|
996
1016
|
slug: record.slug,
|
|
997
1017
|
...buildVocabulary(state),
|
|
1018
|
+
target: state.target?.ticket.id ?? state.baseBranch ?? config.baseBranch,
|
|
1019
|
+
targetDistance:
|
|
1020
|
+
state.kind === 'node' ? undefined : workTargetDistance(state, facts.log.restack),
|
|
998
1021
|
tree: projectTree(record, state, facts.log.restack, pipeline.verify.steps),
|
|
999
1022
|
integrationRow: projectIntegrationRow(record, state, facts.log.restack, config),
|
|
1000
1023
|
integrationDetail: projectIntegrationDetail(record, state, facts.log.restack, config, pipeline),
|
|
@@ -1033,7 +1056,7 @@ export function projectBuildFromFacts(
|
|
|
1033
1056
|
? 'integration awaits verification'
|
|
1034
1057
|
: !landingAuthorized(state.landing)
|
|
1035
1058
|
? 'integration awaits explicit per-build consent'
|
|
1036
|
-
: 'integration awaits guarded
|
|
1059
|
+
: 'integration awaits guarded merge',
|
|
1037
1060
|
}),
|
|
1038
1061
|
]
|
|
1039
1062
|
: steps,
|
|
@@ -1413,11 +1436,11 @@ export function buildVocabulary(state: BuildState): {
|
|
|
1413
1436
|
| 'verifying'
|
|
1414
1437
|
| 'verification failed'
|
|
1415
1438
|
| 'awaiting consent'
|
|
1416
|
-
| 'ready to
|
|
1417
|
-
| 'human
|
|
1418
|
-
| 'fenced
|
|
1419
|
-
| 'unfenced
|
|
1420
|
-
| 'unverified
|
|
1439
|
+
| 'ready to merge'
|
|
1440
|
+
| 'human merge'
|
|
1441
|
+
| 'fenced merge'
|
|
1442
|
+
| 'unfenced merge'
|
|
1443
|
+
| 'unverified merge'
|
|
1421
1444
|
} {
|
|
1422
1445
|
return {
|
|
1423
1446
|
kind: state.kind === 'node' ? treeVocabulary.integrationKind : treeVocabulary.work,
|
|
@@ -1429,13 +1452,13 @@ export function buildVocabulary(state: BuildState): {
|
|
|
1429
1452
|
integration:
|
|
1430
1453
|
state.integration?.audit &&
|
|
1431
1454
|
state.integration.audit.verifiedTree !== state.integration.audit.landedTree
|
|
1432
|
-
? 'unverified
|
|
1455
|
+
? 'unverified merge'
|
|
1433
1456
|
: state.integration?.landing?.provenance === 'human'
|
|
1434
|
-
? 'human
|
|
1457
|
+
? 'human merge'
|
|
1435
1458
|
: state.integration?.landing
|
|
1436
1459
|
? state.integration.landing.fenced
|
|
1437
|
-
? 'fenced
|
|
1438
|
-
: 'unfenced
|
|
1460
|
+
? 'fenced merge'
|
|
1461
|
+
: 'unfenced merge'
|
|
1439
1462
|
: state.nodeRestack?.parentRequest || state.nodeRestack?.parentChange
|
|
1440
1463
|
? 'reparenting'
|
|
1441
1464
|
: integrationFailed(state)
|
|
@@ -27,7 +27,7 @@ export interface DashboardBuildReader {
|
|
|
27
27
|
listBuildsForRepo(repo: string): Promise<BuildRecord[]>
|
|
28
28
|
getEvents(slug: string, sinceSeq?: number): Promise<AbEvent[]>
|
|
29
29
|
listStreams?(scope: StreamScope): Promise<StreamRecord[]>
|
|
30
|
-
getArtifact?(slug: string, kind: string): Promise<Artifact | null>
|
|
30
|
+
getArtifact?(slug: string, kind: string, rev?: number): Promise<Artifact | null>
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export interface DashboardPollSnapshot {
|
|
@@ -140,13 +140,19 @@ export class DashboardBuildPollCache {
|
|
|
140
140
|
* (config absent); all failures are display-only. */
|
|
141
141
|
private async readEffectiveConfig(
|
|
142
142
|
slug: string,
|
|
143
|
+
pin?: BuildState['verify']['configPin'],
|
|
143
144
|
): Promise<
|
|
144
145
|
{ revision?: number; pipelineSource?: PipelineSourceMeta; config?: Config } | undefined
|
|
145
146
|
> {
|
|
146
147
|
const getArtifact = this.reader.getArtifact
|
|
147
148
|
if (getArtifact === undefined) return undefined
|
|
148
149
|
try {
|
|
149
|
-
const artifact = await getArtifact.call(
|
|
150
|
+
const artifact = await getArtifact.call(
|
|
151
|
+
this.reader,
|
|
152
|
+
slug,
|
|
153
|
+
pin?.artifact.kind ?? BUILD_EFFECTIVE_CONFIG_ARTIFACT,
|
|
154
|
+
pin?.artifact.rev,
|
|
155
|
+
)
|
|
150
156
|
if (artifact === null) return undefined
|
|
151
157
|
let config: Config | undefined
|
|
152
158
|
try {
|
|
@@ -176,7 +182,7 @@ export class DashboardBuildPollCache {
|
|
|
176
182
|
): Promise<DashboardBuild | null> {
|
|
177
183
|
const [streams, artifact] = await Promise.all([
|
|
178
184
|
this.readStreams(record.slug),
|
|
179
|
-
this.readEffectiveConfig(record.slug),
|
|
185
|
+
this.readEffectiveConfig(record.slug, state.verify.configPin),
|
|
180
186
|
])
|
|
181
187
|
const pinnedConfig =
|
|
182
188
|
artifact?.config !== undefined ? composeBuildConfig(artifact.config, config) : undefined
|
|
@@ -33,7 +33,12 @@ import type {
|
|
|
33
33
|
DashboardSelection,
|
|
34
34
|
PipelineStep,
|
|
35
35
|
} from './model'
|
|
36
|
-
import {
|
|
36
|
+
import {
|
|
37
|
+
landingPolicyDisplay,
|
|
38
|
+
mergeVocabulary,
|
|
39
|
+
mergeSummary,
|
|
40
|
+
mergedChildren,
|
|
41
|
+
} from './landing-display'
|
|
37
42
|
import { dashboardBuildControl, pauseResumeHelp } from './actions'
|
|
38
43
|
import type { DashboardSession } from './detail'
|
|
39
44
|
import type { TranscriptPresentation, TranscriptTurn } from './transcript'
|
|
@@ -230,15 +235,15 @@ const STEP_COLOR: Record<PipelineStep['state'], ColorName> = {
|
|
|
230
235
|
|
|
231
236
|
/**
|
|
232
237
|
* Elapsed duration, ASCII only: `Xs` under a minute, `MmSSs` under an hour,
|
|
233
|
-
* `
|
|
234
|
-
* the field width is stable as it ticks (`38s`, `4m12s`, `
|
|
238
|
+
* `HhMMmSSs` above — seconds/minutes zero-padded when a larger unit precedes, so
|
|
239
|
+
* the field width is stable as it ticks (`38s`, `4m12s`, `1h04m07s`).
|
|
235
240
|
*/
|
|
236
241
|
export function formatDuration(ms: number): string {
|
|
237
242
|
const totalSec = Math.max(0, Math.floor(ms / 1000))
|
|
238
243
|
if (totalSec < 60) return `${totalSec}s`
|
|
239
244
|
const totalMin = Math.floor(totalSec / 60)
|
|
240
245
|
if (totalMin < 60) return `${totalMin}m${String(totalSec % 60).padStart(2, '0')}s`
|
|
241
|
-
return `${Math.floor(totalMin / 60)}h${String(totalMin % 60).padStart(2, '0')}m`
|
|
246
|
+
return `${Math.floor(totalMin / 60)}h${String(totalMin % 60).padStart(2, '0')}m${String(totalSec % 60).padStart(2, '0')}s`
|
|
242
247
|
}
|
|
243
248
|
|
|
244
249
|
function renderStep(step: PipelineStep, color: boolean, now: number): string {
|
|
@@ -297,6 +302,25 @@ function rightPinnedLine(prefix: string, flexible: string, right: string, width:
|
|
|
297
302
|
return truncate(`${prefix}${left}${gap}${right}`, width)
|
|
298
303
|
}
|
|
299
304
|
|
|
305
|
+
/** Preserve lifecycle, then destination, then identity as space tightens. */
|
|
306
|
+
function buildHeader(
|
|
307
|
+
prefix: string,
|
|
308
|
+
slug: string,
|
|
309
|
+
destination: string,
|
|
310
|
+
right: string,
|
|
311
|
+
width: number,
|
|
312
|
+
status: string,
|
|
313
|
+
): string {
|
|
314
|
+
const pinned = visibleLength(right) > width ? truncate(status, width) : right
|
|
315
|
+
const available = Math.max(0, width - visibleLength(pinned) - 1)
|
|
316
|
+
const identityPrefix = truncate(prefix, available)
|
|
317
|
+
const target = truncate(destination, Math.max(0, available - visibleLength(identityPrefix)))
|
|
318
|
+
const identityBudget = Math.max(0, available - visibleLength(target))
|
|
319
|
+
const identity = truncate(slug, Math.max(0, identityBudget - visibleLength(identityPrefix)))
|
|
320
|
+
const left = `${identityPrefix}${identity}${target}`
|
|
321
|
+
return `${left}${' '.repeat(Math.max(0, width - visibleLength(left) - visibleLength(pinned)))}${pinned}`
|
|
322
|
+
}
|
|
323
|
+
|
|
300
324
|
function reviewRoundCeilingText(build: DashboardBuild): string | undefined {
|
|
301
325
|
if (build.reviewRoundCeilings === undefined) return undefined
|
|
302
326
|
const values = [
|
|
@@ -351,14 +375,7 @@ function renderBuild(
|
|
|
351
375
|
: build.autoMerge === 'cancelling'
|
|
352
376
|
? 'yellow'
|
|
353
377
|
: 'dim'
|
|
354
|
-
if (build.kind !== 'integration')
|
|
355
|
-
rightTokens.push(
|
|
356
|
-
paint(
|
|
357
|
-
`landing ${build.landing?.command?.kind === 'hold' ? 'held' : build.landing?.decision?.mode === 'consent' && build.landing.command?.kind !== 'land' ? 'awaiting consent' : build.autoMerge}`,
|
|
358
|
-
autoColor,
|
|
359
|
-
color,
|
|
360
|
-
),
|
|
361
|
-
)
|
|
378
|
+
if (build.kind !== 'integration') rightTokens.push(paint(mergeSummary(build), autoColor, color))
|
|
362
379
|
}
|
|
363
380
|
if (build.pr !== undefined) rightTokens.push(link(build.pr.url, `PR ${build.pr.state}`, color))
|
|
364
381
|
// A repository hold changes no build lifecycle state. Keep QUEUED literal
|
|
@@ -377,19 +394,27 @@ function renderBuild(
|
|
|
377
394
|
|
|
378
395
|
// The slug is the sole flexible segment; narrow frames truncate it before
|
|
379
396
|
// the right-pinned lifecycle status.
|
|
380
|
-
const
|
|
397
|
+
const destination = build.integrationRow?.destination ?? build.target
|
|
398
|
+
const suffix = build.integrationRow?.parentDistance ?? build.targetDistance ?? '+?'
|
|
399
|
+
const target = destination
|
|
400
|
+
? ` → ${displayText(destination)}${suffix ? ` ${paint(suffix, 'dim', color)}` : ''}`
|
|
401
|
+
: ''
|
|
402
|
+
const lines = [
|
|
403
|
+
buildHeader(
|
|
404
|
+
leftPrefix,
|
|
405
|
+
paint(build.slug, 'bold', color),
|
|
406
|
+
target,
|
|
407
|
+
rightStr,
|
|
408
|
+
width,
|
|
409
|
+
paint(build.status.toUpperCase(), STATUS_COLOR[build.status], color),
|
|
410
|
+
),
|
|
411
|
+
]
|
|
381
412
|
if (build.integrationRow) {
|
|
382
413
|
const row = build.integrationRow
|
|
383
414
|
const { bar, counts } = integrationProgress(row, color)
|
|
384
415
|
lines.push(
|
|
385
416
|
...packLines(
|
|
386
|
-
[
|
|
387
|
-
paint(`integration → ${row.destination}`, 'bold', color),
|
|
388
|
-
bar,
|
|
389
|
-
...(row.parentDistance ? [paint(row.parentDistance, 'dim', color)] : []),
|
|
390
|
-
...counts,
|
|
391
|
-
...(row.verified ? [paint('· verified', 'green', color)] : []),
|
|
392
|
-
],
|
|
417
|
+
[bar, ...counts, ...(row.verified ? [paint('· verified', 'green', color)] : [])],
|
|
393
418
|
width,
|
|
394
419
|
' ',
|
|
395
420
|
),
|
|
@@ -406,13 +431,6 @@ function renderBuild(
|
|
|
406
431
|
lines.push(paint(` ! ${line}`, row.alert.tone, color))
|
|
407
432
|
return lines
|
|
408
433
|
}
|
|
409
|
-
if (build.target)
|
|
410
|
-
lines.push(
|
|
411
|
-
truncate(
|
|
412
|
-
` ${build.kind ?? treeVocabulary.work} · ${treeVocabulary.target} ${build.target}${build.integration ? ` · ${build.integration}` : ''}`,
|
|
413
|
-
width,
|
|
414
|
-
),
|
|
415
|
-
)
|
|
416
434
|
if (build.tree && (build.kind === 'integration' || build.tree.consent)) {
|
|
417
435
|
const tree = build.tree
|
|
418
436
|
for (const text of [
|
|
@@ -523,13 +541,13 @@ function frameWidths(builds: DashboardBuild[], harvest: DashboardHarvest | undef
|
|
|
523
541
|
// ── The frame ────────────────────────────────────────────────────────────────
|
|
524
542
|
|
|
525
543
|
export const DASHBOARD_GLOBAL_LEGEND =
|
|
526
|
-
'Keys: Up/Down select h harvest l
|
|
544
|
+
'Keys: Up/Down select h harvest l merge o hold i intake p pause all r resume all Ctrl-C quit'
|
|
527
545
|
export const DASHBOARD_HARVEST_LEGEND = 'Keys: Up/Down select Ctrl-C quit'
|
|
528
546
|
export const DASHBOARD_HARVEST_RESUME_LEGEND = 'Keys: Up/Down select p resume Ctrl-C quit'
|
|
529
547
|
export const DASHBOARD_HARVEST_ACKNOWLEDGE_LEGEND =
|
|
530
548
|
'Keys: Up/Down select p acknowledge Ctrl-C quit'
|
|
531
549
|
export const DASHBOARD_BUILD_LEGEND =
|
|
532
|
-
'Keys: Up/Down select Enter details l
|
|
550
|
+
'Keys: Up/Down select Enter details l merge o hold p pause a abort Ctrl-C quit'
|
|
533
551
|
export const DASHBOARD_QUEUED_BUILD_LEGEND =
|
|
534
552
|
'Keys: Up/Down select Enter details d discard a abort Ctrl-C quit'
|
|
535
553
|
/** The session view offers ONLY scrolling, back, and quit — it is read-only,
|
|
@@ -553,8 +571,8 @@ function buildLegend(build: DashboardBuild, detail: boolean): string {
|
|
|
553
571
|
const control = dashboardBuildControl(build.status)
|
|
554
572
|
const action = control === undefined ? '' : ` ${control.key} ${control.label}`
|
|
555
573
|
return detail
|
|
556
|
-
? `Keys: Up/Down scroll Left/Right select session Enter transcript l
|
|
557
|
-
: `Keys: Up/Down select Enter details l
|
|
574
|
+
? `Keys: Up/Down scroll Left/Right select session Enter transcript l merge o hold${action} a abort Esc back Ctrl-C quit`
|
|
575
|
+
: `Keys: Up/Down select Enter details l merge o hold${action} a abort Ctrl-C quit`
|
|
558
576
|
}
|
|
559
577
|
|
|
560
578
|
const MESSAGE_PREVIEW_ROWS = 3
|
|
@@ -717,7 +735,7 @@ function integrationProgress(row: NonNullable<DashboardBuild['integrationRow']>,
|
|
|
717
735
|
paint('─'.repeat(children.total ? cells[2]! : 22), 'dim', color)
|
|
718
736
|
counts = children.total
|
|
719
737
|
? [
|
|
720
|
-
paint(
|
|
738
|
+
paint(mergedChildren(children.landed, children.total), 'green', color),
|
|
721
739
|
...(children.building ? [paint(`· ${children.building} building`, 'cyan', color)] : []),
|
|
722
740
|
...(children.queued ? [paint(`· ${children.queued} queued`, 'dim', color)] : []),
|
|
723
741
|
]
|
|
@@ -737,7 +755,7 @@ function detailBody(
|
|
|
737
755
|
if (build.ticketId !== undefined) body.push(` ticket ${displayText(build.ticketId)}`)
|
|
738
756
|
if (build.target && !build.integrationDetail)
|
|
739
757
|
body.push(
|
|
740
|
-
` ${build.kind ?? treeVocabulary.work} · ${treeVocabulary.target} ${build.target}${build.integration ? ` · ${build.integration}` : ''}`,
|
|
758
|
+
` ${build.kind ?? treeVocabulary.work} · ${treeVocabulary.target} ${build.target}${build.targetDistance ? ` ${build.targetDistance}` : ''}${build.integration ? ` · ${build.integration}` : ''}`,
|
|
741
759
|
)
|
|
742
760
|
if (
|
|
743
761
|
!build.integrationDetail &&
|
|
@@ -773,7 +791,10 @@ function detailBody(
|
|
|
773
791
|
body.push(...packLines(['Progress', progress.bar, ...progress.counts], width, ' '))
|
|
774
792
|
field(handPushedLabel, handPushedText(detail.handPushedCommits))
|
|
775
793
|
field('Branch', `${detail.branch} · restack ${detail.restack}`)
|
|
776
|
-
|
|
794
|
+
field(
|
|
795
|
+
'Parent',
|
|
796
|
+
`${build.integrationRow.destination}${detail.parentDistance ? ` ${detail.parentDistance}` : ''}`,
|
|
797
|
+
)
|
|
777
798
|
for (const path of detail.conflictFiles ?? []) field('Conflict', path)
|
|
778
799
|
body.push(
|
|
779
800
|
...packLines(
|
|
@@ -786,7 +807,7 @@ function detailBody(
|
|
|
786
807
|
body.push(
|
|
787
808
|
'',
|
|
788
809
|
paint(
|
|
789
|
-
`Children ${open} open · ${detail.children.length - open}
|
|
810
|
+
`Children ${open} open · ${detail.children.length - open} ${mergeVocabulary.merged}${detail.membershipKnown ? '' : ' · membership unknown'}`,
|
|
790
811
|
'bold',
|
|
791
812
|
color,
|
|
792
813
|
),
|
|
@@ -805,9 +826,10 @@ function detailBody(
|
|
|
805
826
|
body.push('')
|
|
806
827
|
field('Verification', detail.verification)
|
|
807
828
|
for (const result of detail.verifySteps) field(result.step, result.outcome)
|
|
808
|
-
field(
|
|
829
|
+
field(mergeVocabulary.title, detail.landing)
|
|
809
830
|
}
|
|
810
|
-
if (build.kind !== 'integration')
|
|
831
|
+
if (build.kind !== 'integration')
|
|
832
|
+
body.push(` ${mergeVocabulary.label} ${landingPolicyDisplay(build.landing)}`)
|
|
811
833
|
const ceiling = reviewRoundCeilingText(build)
|
|
812
834
|
if (ceiling !== undefined) body.push(` ${ceiling}`)
|
|
813
835
|
if (build.pr !== undefined)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BuildState } from '../../kernel/reducer'
|
|
2
|
+
import type { LeafRestackState } from '../../kernel/leaf-restack-state'
|
|
3
|
+
|
|
4
|
+
export function distanceSuffix(count: number | null | undefined, terminal?: string): string {
|
|
5
|
+
if (terminal === 'merged' || terminal === 'closed') return ''
|
|
6
|
+
if (count == null || !Number.isSafeInteger(count) || count < 0) return '+?'
|
|
7
|
+
return count === 0 ? '' : `+${count}`
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function workTargetDistance(state: BuildState, restack: LeafRestackState): string {
|
|
11
|
+
const sample = restack.distance
|
|
12
|
+
const valid = sample && sample.branch === state.baseBranch && sample.sha === restack.target?.sha
|
|
13
|
+
return distanceSuffix(valid ? sample.count : null, state.prState)
|
|
14
|
+
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
integrationCurrent,
|
|
7
7
|
integrationCycleVerified,
|
|
8
8
|
} from '../../kernel/integration-state'
|
|
9
|
+
import { mergeVocabulary } from './landing-display'
|
|
9
10
|
import { awaitsConsent, landingReady } from '../../kernel/landing-readiness'
|
|
10
11
|
|
|
11
12
|
export const treeVocabulary = {
|
|
@@ -13,7 +14,7 @@ export const treeVocabulary = {
|
|
|
13
14
|
node: 'node',
|
|
14
15
|
target: 'target',
|
|
15
16
|
integration: 'integration build',
|
|
16
|
-
landing:
|
|
17
|
+
landing: mergeVocabulary.label,
|
|
17
18
|
restack: 'restack',
|
|
18
19
|
consent: 'consent',
|
|
19
20
|
queue: 'queue',
|
|
@@ -25,7 +26,7 @@ export const treeVocabulary = {
|
|
|
25
26
|
verification: 'verification',
|
|
26
27
|
current: 'current',
|
|
27
28
|
pending: 'pending',
|
|
28
|
-
readyToLand: 'ready to
|
|
29
|
+
readyToLand: 'ready to merge',
|
|
29
30
|
notReady: 'not ready',
|
|
30
31
|
} as const
|
|
31
32
|
|
|
@@ -32,7 +32,7 @@ export function parseDispatchArgs(
|
|
|
32
32
|
throw new Error(`--intake and --no-intake cannot be combined — ${usage}`)
|
|
33
33
|
}
|
|
34
34
|
if (sawAutoMerge || sawNoAutoMerge) {
|
|
35
|
-
throw new Error(`Auto-merge flags are retired; configure [[
|
|
35
|
+
throw new Error(`Auto-merge flags are retired; configure [[merge]] policy — ${usage}`)
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const interval = stringFlag(parsed, 'interval')
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { normalizeEffectiveConfigArtifact } from '../config/effective-artifact'
|
|
1
2
|
import { migrationIdentity, ticketMigrationsReducer } from '../kernel/ticket-migrations'
|
|
2
3
|
import type { DispatchUpgradeState } from '../kernel/dispatch-upgrade'
|
|
3
4
|
import { releaseDispatchPresentation } from './dispatch-presentation-ownership'
|
|
@@ -297,7 +298,9 @@ export class DispatchFrontend {
|
|
|
297
298
|
if (this.config !== undefined && this.configRef === key) return this.config
|
|
298
299
|
const artifact = await this.reader.getRepoArtifact(this.opts.repo, kind, rev)
|
|
299
300
|
if (artifact === null) throw new Error(`effective config ${key} is not retrievable`)
|
|
300
|
-
const parsed = configSchema.parse(
|
|
301
|
+
const parsed = configSchema.parse(
|
|
302
|
+
normalizeEffectiveConfigArtifact(JSON.parse(new TextDecoder().decode(artifact.content))),
|
|
303
|
+
)
|
|
301
304
|
this.config = parsed
|
|
302
305
|
this.configRef = key
|
|
303
306
|
this.configRevision += 1
|
|
@@ -749,8 +752,8 @@ export class DispatchFrontend {
|
|
|
749
752
|
: result.command === 'abort'
|
|
750
753
|
? `build ${slug}: abort requested`
|
|
751
754
|
: result.command === 'land'
|
|
752
|
-
? `build ${slug}:
|
|
753
|
-
: `build ${slug}:
|
|
755
|
+
? `build ${slug}: merge consent requested`
|
|
756
|
+
: `build ${slug}: merge hold requested`
|
|
754
757
|
await this.report(message)
|
|
755
758
|
await this.renderOnce()
|
|
756
759
|
}
|