@defrex/autobuild 1.0.0-beta.1 → 1.0.0-beta.3
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/SPEC.md +310 -56
- package/bin/ab-build-runner.ts +10 -8
- package/docs/architecture.md +177 -23
- package/docs/configuration.md +35 -4
- package/docs/hosted-service.md +35 -0
- package/docs/integration-tree.md +83 -4
- package/docs/landing-policy.md +11 -0
- package/docs/migration-1.0.md +9 -0
- package/docs/operator-api.md +18 -0
- package/docs/remote-store-protocol.md +16 -0
- package/docs/remote-ticket-protocol.md +5 -0
- package/docs/restacking.md +42 -7
- package/docs/setup.md +25 -0
- package/docs/spec-standard.md +71 -0
- package/docs/ticket-dependencies.md +6 -45
- package/docs/ticket-migration.md +50 -4
- package/package.json +3 -3
- package/packages/core/src/cli/attention.ts +4 -1
- package/packages/core/src/cli/binary.ts +17 -1
- package/packages/core/src/cli/build-control.ts +3 -3
- package/packages/core/src/cli/context.ts +53 -1
- package/packages/core/src/cli/dashboard/actions.ts +4 -0
- package/packages/core/src/cli/dashboard/detail.ts +45 -1
- package/packages/core/src/cli/dashboard/facts.ts +7 -2
- package/packages/core/src/cli/dashboard/integration-detail.ts +144 -0
- package/packages/core/src/cli/dashboard/integration-row.ts +255 -0
- package/packages/core/src/cli/dashboard/landing-display.ts +64 -0
- package/packages/core/src/cli/dashboard/model.ts +147 -16
- package/packages/core/src/cli/dashboard/poll.ts +40 -4
- package/packages/core/src/cli/dashboard/render.ts +106 -5
- package/packages/core/src/cli/dashboard/transcript.ts +2 -1
- package/packages/core/src/cli/dispatch-frontend.ts +11 -0
- package/packages/core/src/cli/dispatch-repository-feed.ts +2 -1
- package/packages/core/src/cli/dispatch.ts +49 -14
- package/packages/core/src/cli/help.ts +17 -1
- package/packages/core/src/cli/main.ts +48 -8
- package/packages/core/src/cli/publication-settlement.ts +49 -5
- package/packages/core/src/cli/repository-status.ts +103 -2
- package/packages/core/src/cli/status.ts +24 -1
- package/packages/core/src/cli/terminals.ts +94 -93
- package/packages/core/src/cli/ticket.ts +35 -11
- package/packages/core/src/cli/wait.ts +11 -2
- package/packages/core/src/cli/watch.ts +12 -0
- package/packages/core/src/config/schema.ts +3 -0
- package/packages/core/src/events/catalog.ts +38 -0
- package/packages/core/src/events/compatibility.ts +183 -0
- package/packages/core/src/events/native-session.ts +13 -0
- package/packages/core/src/events/payloads.ts +150 -2
- package/packages/core/src/events/policy.ts +210 -0
- package/packages/core/src/events/repository.ts +69 -0
- package/packages/core/src/integration/harness.ts +4 -4
- package/packages/core/src/kernel/__snapshots__/{reducer-registry.test.ts.snap → reducer-accumulator-shapes.json} +4286 -4006
- package/packages/core/src/kernel/change-presence.ts +11 -3
- package/packages/core/src/kernel/dispatch-capacity.ts +127 -0
- package/packages/core/src/kernel/dispatcher-liveness.ts +5 -1
- package/packages/core/src/kernel/engine.ts +25 -5
- package/packages/core/src/kernel/forge-health.ts +19 -0
- package/packages/core/src/kernel/generators/build-log.ts +18 -0
- package/packages/core/src/kernel/generators/node-restack-log.ts +1 -1
- package/packages/core/src/kernel/generators/repository-journals.ts +10 -0
- package/packages/core/src/kernel/guarded-forge.ts +159 -0
- package/packages/core/src/kernel/incremental.ts +4 -2
- package/packages/core/src/kernel/integration-completeness.ts +108 -9
- package/packages/core/src/kernel/integration-landing.ts +5 -4
- package/packages/core/src/kernel/janitor-failure.ts +36 -0
- package/packages/core/src/kernel/landing-publication.ts +35 -15
- package/packages/core/src/kernel/landing-state.ts +7 -0
- package/packages/core/src/kernel/leaf-restack-state.ts +1 -1
- package/packages/core/src/kernel/log-index.ts +12 -1
- package/packages/core/src/kernel/mixed-version.ts +52 -0
- package/packages/core/src/kernel/node-landing.ts +14 -11
- package/packages/core/src/kernel/node-parent.ts +35 -10
- package/packages/core/src/kernel/node-restack-demand.ts +29 -0
- package/packages/core/src/kernel/node-restack-state.ts +46 -16
- package/packages/core/src/kernel/node-restack-transaction.ts +151 -8
- package/packages/core/src/kernel/node-restack.ts +34 -10
- package/packages/core/src/kernel/publication.ts +22 -0
- package/packages/core/src/kernel/read-deferrals.ts +111 -0
- package/packages/core/src/kernel/read-facts.ts +34 -6
- package/packages/core/src/kernel/reconcile-restack.ts +23 -2
- package/packages/core/src/kernel/reducer-registry.ts +18 -2
- package/packages/core/src/kernel/reducer.ts +196 -10
- package/packages/core/src/kernel/repository-attention.ts +38 -1
- package/packages/core/src/kernel/terminal-guard.ts +11 -4
- package/packages/core/src/kernel/ticket-migrations.ts +139 -0
- package/packages/core/src/operator/annotations.ts +6 -0
- package/packages/core/src/operator/index.ts +2 -0
- package/packages/core/src/operator/presentation.ts +5 -0
- package/packages/core/src/operator/query.ts +51 -11
- package/packages/core/src/operator/registry.ts +17 -1
- package/packages/core/src/operator/restack.ts +51 -0
- package/packages/core/src/operator/tickets.ts +30 -26
- package/packages/core/src/plugin-sdk/index.ts +10 -0
- package/packages/core/src/plugins/manifest.ts +1 -1
- package/packages/core/src/ports/forge/contract.ts +23 -0
- package/packages/core/src/ports/forge/fake.ts +6 -2
- package/packages/core/src/ports/forge/git-rewrite.ts +92 -64
- package/packages/core/src/ports/forge/github-transport.ts +45 -2
- package/packages/core/src/ports/forge/github.ts +56 -17
- package/packages/core/src/ports/forge/local-git.ts +7 -2
- package/packages/core/src/ports/forge-failure.ts +40 -0
- package/packages/core/src/ports/forge-request-context.ts +35 -0
- package/packages/core/src/ports/forge-telemetry.ts +16 -0
- package/packages/core/src/ports/runner/claude.ts +136 -9
- package/packages/core/src/ports/runner/codex.ts +112 -7
- package/packages/core/src/ports/runner/contract.ts +78 -0
- package/packages/core/src/ports/runner/fake.ts +59 -1
- package/packages/core/src/ports/runner/native-cli-fixture.ts +86 -0
- package/packages/core/src/ports/runner/native-process-fixture.ts +38 -0
- package/packages/core/src/ports/runner/native-session.ts +110 -0
- package/packages/core/src/ports/runner/pi-rpc.ts +7 -1
- package/packages/core/src/ports/runner/pi.ts +162 -2
- package/packages/core/src/ports/tickets/linear.ts +180 -12
- package/packages/core/src/ports/tickets/migration.ts +92 -9
- package/packages/core/src/ports/types.ts +60 -5
- package/packages/core/src/ports/workspace/git-worktree.ts +45 -51
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +28 -12
- package/packages/core/src/processes/build-child-exit.ts +50 -2
- package/packages/core/src/processes/build-child.ts +15 -7
- package/packages/core/src/processes/build-runner.ts +909 -213
- package/packages/core/src/processes/dispatcher.ts +815 -369
- package/packages/core/src/processes/execution-no-progress.ts +15 -0
- package/packages/core/src/processes/pause-execution-fixture.ts +37 -0
- package/packages/core/src/processes/phase-failure-budget.ts +2 -1
- package/packages/core/src/processes/publication-loss.ts +7 -3
- package/packages/core/src/processes/repo-view.ts +53 -6
- package/packages/core/src/processes/tick-publication.ts +6 -2
- package/packages/core/src/runtime-identity.ts +37 -0
- package/packages/core/src/store/adapter.ts +4 -2
- package/packages/core/src/store/build-scope.ts +9 -0
- package/packages/core/src/store/contract.ts +233 -16
- package/packages/core/src/store/digest.ts +20 -2
- package/packages/core/src/store/local/schema.ts +6 -0
- package/packages/core/src/store/local/store.ts +57 -4
- package/packages/core/src/store/memory.ts +83 -2
- package/packages/core/src/store/new-build.ts +2 -2
- package/packages/core/src/store/phase-session.ts +13 -0
- package/packages/core/src/store/reduced-reads.ts +43 -4
- package/packages/core/src/store/reducer-value-shapes.json +8911 -6344
- package/packages/core/src/store/reducer-value-validation.ts +103 -3
- package/packages/core/src/store/reducer-values.ts +21 -6
- package/packages/core/src/store/remote/client.ts +145 -20
- package/packages/core/src/store/remote/index.ts +2 -0
- package/packages/core/src/store/remote/protocol.ts +19 -0
- package/packages/core/src/store/remote/version.ts +2 -0
- package/packages/core/src/store/repo-state-events.ts +5 -2
- package/packages/core/src/store/repo-tick.ts +6 -1
- package/packages/core/src/store/session-handle.ts +8 -0
- package/packages/core/src/store/snapshots.ts +21 -5
- package/packages/core/src/store/types.ts +17 -1
- package/packages/core/src/testing/dispatch-read-budget.ts +18 -2
- package/packages/core/src/testing/index.ts +7 -0
- package/packages/core/src/testing/newer-writer.ts +37 -0
- package/packages/core/src/testing/reduced-read-budget.ts +3 -0
- package/skills/guide/SKILL.md +140 -25
- package/skills/guide/references/integration-tree.md +83 -4
- package/skills/guide/references/landing-policy.md +11 -0
- package/skills/guide/references/migration-1.0.md +9 -0
- package/skills/guide/references/operator-api.md +18 -0
- package/skills/guide/references/plugin-authoring.md +47 -4
- package/skills/guide/references/remote-store-protocol.md +16 -0
- package/skills/guide/references/remote-ticket-protocol.md +5 -0
- package/skills/guide/references/restacking.md +42 -7
- package/skills/guide/references/setup.md +25 -0
- package/skills/guide/references/spec-standard.md +71 -0
- package/skills/guide/references/ticket-dependencies.md +6 -45
- package/skills/guide/references/ticket-migration.md +50 -4
- package/skills/implement/SKILL.md +4 -2
- package/skills/operate/SKILL.md +63 -6
- package/skills/reconcile/SKILL.md +3 -1
- package/skills/spec/SKILL.md +62 -40
- package/skills/tickets/SKILL.md +15 -43
|
@@ -2,7 +2,17 @@ import type { RepositoryEvent } from '../events/repository'
|
|
|
2
2
|
import { defineReducer } from './incremental'
|
|
3
3
|
type Degraded = Extract<RepositoryEvent, { type: 'dispatcher.ticket-source-degraded' }>
|
|
4
4
|
type Failed = Extract<RepositoryEvent, { type: 'dispatcher.tick-failed' }>
|
|
5
|
+
type ForgeDegraded = Extract<RepositoryEvent, { type: 'dispatcher.forge-degraded' }>
|
|
6
|
+
type ForgeAttention = { event: ForgeDegraded; deadline: number; retryObserved: boolean }
|
|
5
7
|
export type PersistenceObservation =
|
|
8
|
+
| {
|
|
9
|
+
type: 'dispatcher.forge-persistent'
|
|
10
|
+
forge: string
|
|
11
|
+
message: string
|
|
12
|
+
resetAt: string
|
|
13
|
+
episodeSeq: number
|
|
14
|
+
observedAt: string
|
|
15
|
+
}
|
|
6
16
|
| {
|
|
7
17
|
type: 'dispatcher.ticket-source-persistent'
|
|
8
18
|
source: string
|
|
@@ -30,6 +40,7 @@ interface SourceAttention {
|
|
|
30
40
|
retryObserved: boolean
|
|
31
41
|
}
|
|
32
42
|
export interface RepositoryAttentionState {
|
|
43
|
+
forge?: ForgeAttention
|
|
33
44
|
sources: [string, SourceAttention][]
|
|
34
45
|
failure?: Failed
|
|
35
46
|
tickStarts: [string, number][]
|
|
@@ -37,16 +48,19 @@ export interface RepositoryAttentionState {
|
|
|
37
48
|
/** Incremental journal projection. Episode starts survive run anchors and
|
|
38
49
|
* repeated evidence can strengthen, but never postpone, an existing deadline. */
|
|
39
50
|
export class RepositoryAttention {
|
|
51
|
+
private forge: ForgeAttention | undefined
|
|
40
52
|
private sources: Map<string, SourceAttention>
|
|
41
53
|
private failure: Failed | undefined
|
|
42
54
|
private tickStarts: Map<string, number>
|
|
43
55
|
constructor(state?: RepositoryAttentionState) {
|
|
56
|
+
this.forge = state?.forge
|
|
44
57
|
this.sources = new Map(state?.sources ?? [])
|
|
45
58
|
this.failure = state?.failure
|
|
46
59
|
this.tickStarts = new Map(state?.tickStarts ?? [])
|
|
47
60
|
}
|
|
48
61
|
snapshot(): RepositoryAttentionState {
|
|
49
62
|
return structuredClone({
|
|
63
|
+
forge: this.forge,
|
|
50
64
|
sources: [...this.sources],
|
|
51
65
|
failure: this.failure,
|
|
52
66
|
tickStarts: [...this.tickStarts],
|
|
@@ -65,12 +79,21 @@ export class RepositoryAttention {
|
|
|
65
79
|
const startedAt = this.tickStarts.get(run)
|
|
66
80
|
this.tickStarts.delete(run)
|
|
67
81
|
if (startedAt === undefined) return
|
|
82
|
+
if (this.forge && startedAt >= this.forge.deadline) this.forge.retryObserved = true
|
|
68
83
|
for (const source of this.sources.values()) {
|
|
69
84
|
if (startedAt >= source.deadline) source.retryObserved = true
|
|
70
85
|
}
|
|
71
86
|
}
|
|
72
87
|
fold(event: RepositoryEvent): void {
|
|
73
88
|
switch (event.type) {
|
|
89
|
+
case 'dispatcher.forge-degraded':
|
|
90
|
+
if (!this.forge)
|
|
91
|
+
this.forge = { event, deadline: Date.parse(event.payload.resetAt), retryObserved: false }
|
|
92
|
+
else this.forge.deadline = Math.min(this.forge.deadline, Date.parse(event.payload.resetAt))
|
|
93
|
+
break
|
|
94
|
+
case 'dispatcher.forge-recovered':
|
|
95
|
+
this.forge = undefined
|
|
96
|
+
break
|
|
74
97
|
case 'dispatcher.ticket-source-degraded': {
|
|
75
98
|
const existing = this.sources.get(event.payload.source)
|
|
76
99
|
const deadline =
|
|
@@ -143,6 +166,20 @@ export class RepositoryAttention {
|
|
|
143
166
|
},
|
|
144
167
|
})
|
|
145
168
|
}
|
|
169
|
+
if (this.forge?.retryObserved && now.getTime() >= this.forge.deadline) {
|
|
170
|
+
const { event } = this.forge
|
|
171
|
+
results.push({
|
|
172
|
+
identity: `forge:${event.seq}`,
|
|
173
|
+
observation: {
|
|
174
|
+
type: 'dispatcher.forge-persistent',
|
|
175
|
+
forge: event.payload.forge,
|
|
176
|
+
message: event.payload.message,
|
|
177
|
+
resetAt: event.payload.resetAt,
|
|
178
|
+
episodeSeq: event.seq,
|
|
179
|
+
observedAt: now.toISOString(),
|
|
180
|
+
},
|
|
181
|
+
})
|
|
182
|
+
}
|
|
146
183
|
const event = this.failure
|
|
147
184
|
if (
|
|
148
185
|
event &&
|
|
@@ -168,7 +205,7 @@ export const repositoryAttentionReducer = defineReducer<
|
|
|
168
205
|
RepositoryEvent,
|
|
169
206
|
RepositoryAttentionState
|
|
170
207
|
>({
|
|
171
|
-
version:
|
|
208
|
+
version: 2,
|
|
172
209
|
initial: () => ({ sources: [], tickStarts: [] }),
|
|
173
210
|
fold(acc, events) {
|
|
174
211
|
const attention = new RepositoryAttention(acc)
|
|
@@ -13,7 +13,7 @@ interface TerminalGuardAcc {
|
|
|
13
13
|
export function terminalGuardReducer(env: CliEnv) {
|
|
14
14
|
const spec = phaseSpecFor(env.phase)
|
|
15
15
|
return defineReducer<TerminalGuardAcc, AbEvent, { diagnostic?: string }>({
|
|
16
|
-
version:
|
|
16
|
+
version: 2,
|
|
17
17
|
initial: () => ({ reconcileAttempt: 0 }),
|
|
18
18
|
fold(acc, events) {
|
|
19
19
|
for (const event of events) {
|
|
@@ -46,10 +46,17 @@ function checkEvent(
|
|
|
46
46
|
): void {
|
|
47
47
|
const spec = phaseSpecFor(env.phase)
|
|
48
48
|
const restartSeq = 0
|
|
49
|
-
if (event.type === 'session.
|
|
49
|
+
if (event.type === 'session.started' && event.payload.continuation?.predecessor === env.session)
|
|
50
50
|
throw new Error(
|
|
51
|
-
`terminal rejected (D5): session "${env.session}"
|
|
52
|
-
|
|
51
|
+
`terminal rejected (D5): session "${env.session}" was superseded by continuation ${event.payload.session}`,
|
|
52
|
+
)
|
|
53
|
+
if (
|
|
54
|
+
(event.type === 'session.ended' || event.type === 'session.suspended') &&
|
|
55
|
+
event.payload.session === env.session
|
|
56
|
+
) {
|
|
57
|
+
throw new Error(
|
|
58
|
+
`terminal rejected (D5): session "${env.session}" already ${event.type === 'session.suspended' ? 'suspended' : 'ended'} ` +
|
|
59
|
+
`(${event.type} at seq ${event.seq}) — a session that ended without ` +
|
|
53
60
|
'a terminal was failed and retried; only the live retry may complete ' +
|
|
54
61
|
'this phase round (§8.4).',
|
|
55
62
|
)
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { readRepositoryFacts } from '../store/reduced-reads'
|
|
2
|
+
import type { TicketRef } from '../ontology'
|
|
3
|
+
import type { Actor } from '../events/envelope'
|
|
4
|
+
import type { RepositoryEvent, RepositoryEventPayload } from '../events/repository'
|
|
5
|
+
import { validateRepositoryEventWrite } from '../events/repository'
|
|
6
|
+
import type { BuildStore } from '../store/types'
|
|
7
|
+
import { defineReducer } from './incremental'
|
|
8
|
+
|
|
9
|
+
type Migration = RepositoryEventPayload<'tickets.migration-recorded'>
|
|
10
|
+
export interface TicketMigrations {
|
|
11
|
+
migrations: Migration[]
|
|
12
|
+
}
|
|
13
|
+
const key = (ref: TicketRef) => JSON.stringify([ref.source, ref.id])
|
|
14
|
+
function stable(value: Migration): string {
|
|
15
|
+
return JSON.stringify([value.from, value.to, Object.entries(value.mapping).sort()])
|
|
16
|
+
}
|
|
17
|
+
function add(state: TicketMigrations, migration: Migration) {
|
|
18
|
+
const previous = state.migrations.find((m) => m.identity === migration.identity)
|
|
19
|
+
if (previous) {
|
|
20
|
+
if (stable(previous) !== stable(migration))
|
|
21
|
+
throw new Error(`conflicting ticket migration ${migration.identity}`)
|
|
22
|
+
return
|
|
23
|
+
}
|
|
24
|
+
for (const old of state.migrations)
|
|
25
|
+
if (old.from !== old.to && migration.from !== migration.to && old.from === migration.from)
|
|
26
|
+
for (const [id, next] of Object.entries(migration.mapping))
|
|
27
|
+
if (Object.hasOwn(old.mapping, id) && (old.to !== migration.to || old.mapping[id] !== next))
|
|
28
|
+
throw new Error(`conflicting ticket migration for ${migration.from}:${id}`)
|
|
29
|
+
state.migrations.push(migration)
|
|
30
|
+
// Reject cycles even before any build consults the evidence.
|
|
31
|
+
for (const m of state.migrations)
|
|
32
|
+
for (const id of Object.keys(m.mapping)) walk(state, { source: m.from, id })
|
|
33
|
+
}
|
|
34
|
+
function walk(
|
|
35
|
+
state: TicketMigrations,
|
|
36
|
+
original: TicketRef,
|
|
37
|
+
destination?: string,
|
|
38
|
+
build = 'unknown',
|
|
39
|
+
): TicketRef {
|
|
40
|
+
let current = original
|
|
41
|
+
const visited = new Set<string>()
|
|
42
|
+
while (current.source !== destination) {
|
|
43
|
+
if (visited.has(key(current)))
|
|
44
|
+
throw new Error(`ticket migration cycle at ${current.source}:${current.id}`)
|
|
45
|
+
visited.add(key(current))
|
|
46
|
+
const routes = state.migrations.filter((m) => m.from === current.source && m.from !== m.to)
|
|
47
|
+
const route = routes.find((m) => Object.hasOwn(m.mapping, current.id))
|
|
48
|
+
if (!route) {
|
|
49
|
+
if (destination === undefined) return current
|
|
50
|
+
throw new Error(
|
|
51
|
+
`build ${build} ticket ${original.source}:${original.id}: ${routes.length ? 'recorded migration does not cover id' : 'configured ticket source differs from the frozen node source'}; record continuity with ab ticket migration record <export-dir>`,
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
if (route.to === current.source && route.mapping[current.id] === current.id) return current
|
|
55
|
+
current = { ...current, source: route.to, id: route.mapping[current.id]! }
|
|
56
|
+
}
|
|
57
|
+
return current
|
|
58
|
+
}
|
|
59
|
+
export const ticketMigrationsReducer = defineReducer<
|
|
60
|
+
TicketMigrations,
|
|
61
|
+
RepositoryEvent,
|
|
62
|
+
TicketMigrations
|
|
63
|
+
>({
|
|
64
|
+
version: 1,
|
|
65
|
+
initial: () => ({ migrations: [] }),
|
|
66
|
+
fold(acc, events) {
|
|
67
|
+
for (const event of events)
|
|
68
|
+
if (event.type === 'tickets.migration-recorded') add(acc, event.payload)
|
|
69
|
+
},
|
|
70
|
+
finish: (acc) => acc,
|
|
71
|
+
})
|
|
72
|
+
export function resolveTicketRef(
|
|
73
|
+
state: TicketMigrations,
|
|
74
|
+
ref: TicketRef,
|
|
75
|
+
destination: string,
|
|
76
|
+
build?: string,
|
|
77
|
+
): TicketRef {
|
|
78
|
+
// Preserve the pre-existing database/hosted adapter compatibility.
|
|
79
|
+
const hosted = destination === 'hosted' || destination === 'database'
|
|
80
|
+
const compatible = ref.source === 'database' && hosted ? { ...ref, source: 'hosted' } : ref
|
|
81
|
+
const current = walk(
|
|
82
|
+
state,
|
|
83
|
+
compatible,
|
|
84
|
+
destination === 'database' ? 'hosted' : destination,
|
|
85
|
+
build,
|
|
86
|
+
)
|
|
87
|
+
return destination === 'database' ? { ...current, source: 'database' } : current
|
|
88
|
+
}
|
|
89
|
+
export function migrationIdentity(state: TicketMigrations, destination: string) {
|
|
90
|
+
return (ref: TicketRef, build?: string): string => {
|
|
91
|
+
try {
|
|
92
|
+
return key(resolveTicketRef(state, ref, destination, build))
|
|
93
|
+
} catch (error) {
|
|
94
|
+
if (state.migrations.some((m) => m.from === ref.source && m.from !== m.to)) throw error
|
|
95
|
+
return key(ref)
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/** Comparison only for all-history scans. Uncovered history remains in its
|
|
100
|
+
* original namespace and cannot alias a current-source ticket. Live claims,
|
|
101
|
+
* frozen membership and current-ticket operations must use strict resolution. */
|
|
102
|
+
export function historicalTicketIdentity(state: TicketMigrations, destination: string) {
|
|
103
|
+
const identity = migrationIdentity(state, destination)
|
|
104
|
+
return (ref: TicketRef, build?: string): string => {
|
|
105
|
+
try {
|
|
106
|
+
return identity(ref, build)
|
|
107
|
+
} catch {
|
|
108
|
+
return key(ref)
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export async function readTicketMigrations(
|
|
113
|
+
store: BuildStore,
|
|
114
|
+
repo: string,
|
|
115
|
+
): Promise<TicketMigrations> {
|
|
116
|
+
return (await readRepositoryFacts(store, repo)).value.ticketMigrations
|
|
117
|
+
}
|
|
118
|
+
export async function currentTicketRef(
|
|
119
|
+
store: BuildStore,
|
|
120
|
+
repo: string,
|
|
121
|
+
destination: string,
|
|
122
|
+
ref: TicketRef,
|
|
123
|
+
build?: string,
|
|
124
|
+
) {
|
|
125
|
+
return resolveTicketRef(await readTicketMigrations(store, repo), ref, destination, build)
|
|
126
|
+
}
|
|
127
|
+
export async function recordTicketMigration(
|
|
128
|
+
store: BuildStore,
|
|
129
|
+
repo: string,
|
|
130
|
+
actor: Actor,
|
|
131
|
+
migration: Migration,
|
|
132
|
+
) {
|
|
133
|
+
validateRepositoryEventWrite({ actor, type: 'tickets.migration-recorded', payload: migration })
|
|
134
|
+
const state = structuredClone(await readTicketMigrations(store, repo))
|
|
135
|
+
const repeated = state.migrations.some((m) => m.identity === migration.identity)
|
|
136
|
+
add(state, migration)
|
|
137
|
+
if (!repeated)
|
|
138
|
+
await store.appendRepo(repo, { actor, type: 'tickets.migration-recorded', payload: migration })
|
|
139
|
+
}
|
|
@@ -62,6 +62,12 @@ export const OPERATOR_TOOL_ANNOTATIONS = {
|
|
|
62
62
|
idempotentHint: true,
|
|
63
63
|
approval: 'never',
|
|
64
64
|
},
|
|
65
|
+
'builds.restack': {
|
|
66
|
+
readOnlyHint: false,
|
|
67
|
+
destructiveHint: false,
|
|
68
|
+
idempotentHint: true,
|
|
69
|
+
approval: 'default',
|
|
70
|
+
},
|
|
65
71
|
'builds.control': {
|
|
66
72
|
readOnlyHint: false,
|
|
67
73
|
destructiveHint: true,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export { capacityExplanation } from '../kernel/dispatch-capacity'
|
|
1
2
|
export { landingPolicyDisplay } from '../cli/dashboard/landing-display'
|
|
2
3
|
export {
|
|
4
|
+
pauseResumeHelp,
|
|
3
5
|
buildActionAvailability,
|
|
4
6
|
dashboardBuildControl,
|
|
5
7
|
harvestActionAvailability,
|
|
@@ -21,3 +23,6 @@ export type {
|
|
|
21
23
|
TranscriptTurn,
|
|
22
24
|
TranscriptUsage,
|
|
23
25
|
} from '../cli/dashboard/transcript'
|
|
26
|
+
|
|
27
|
+
export type { IntegrationDetail, IntegrationChild } from '../cli/dashboard/integration-detail'
|
|
28
|
+
export { displayText } from '../cli/dashboard/cells'
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { migrationIdentity } from '../kernel/ticket-migrations'
|
|
2
|
+
import { enrichIntegrationRows } from '../cli/dashboard/integration-row'
|
|
3
|
+
import { dispatchCapacity, type CapacityBuild } from '../kernel/dispatch-capacity'
|
|
1
4
|
import { forgeReadinessWarnings } from '../kernel/dispatch-status'
|
|
2
5
|
import { readBuildDigests } from '../store/reduced-reads'
|
|
3
6
|
import {
|
|
@@ -22,7 +25,11 @@ import {
|
|
|
22
25
|
type BuildDetail,
|
|
23
26
|
type BuildSummary,
|
|
24
27
|
} from '../cli/status'
|
|
25
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
repositoryStatusFromFacts,
|
|
30
|
+
readRepositoryCapacity,
|
|
31
|
+
type RepositoryStatus,
|
|
32
|
+
} from '../cli/repository-status'
|
|
26
33
|
import { projectHarvestStatus, type HarvestStatusView } from '../cli/harvest'
|
|
27
34
|
import {
|
|
28
35
|
buildDashboardFromProjected,
|
|
@@ -278,7 +285,26 @@ export async function getOperatorBuild(opts: {
|
|
|
278
285
|
const row = projectBuildFromFacts(record, state, facts, config, undefined, pinned.config)
|
|
279
286
|
// Implied by the gate; kept as an explicit check (not an assertion) so the
|
|
280
287
|
// code never lies if `effectiveStatus` and `projectBuild` ever drift.
|
|
281
|
-
if (row !== null)
|
|
288
|
+
if (row !== null) {
|
|
289
|
+
dashboardRow = decorateWithPinnedMeta(row, pinned)
|
|
290
|
+
if (row.integrationDetail) {
|
|
291
|
+
const records = await opts.store.listBuildsForRepo(opts.repo)
|
|
292
|
+
const digests = await readBuildDigests(opts.store, opts.repo)
|
|
293
|
+
const children: DashboardBuild[] = []
|
|
294
|
+
for (const child of records) {
|
|
295
|
+
if (
|
|
296
|
+
child.repo !== opts.repo ||
|
|
297
|
+
child.slug === row.slug ||
|
|
298
|
+
digests.get(child.slug)?.terminal === 'done'
|
|
299
|
+
)
|
|
300
|
+
continue
|
|
301
|
+
const facts = (await readBuildFacts(opts.store, child.slug)).value
|
|
302
|
+
const projected = projectBuildFromFacts(child, facts.state, facts, config)
|
|
303
|
+
if (projected) children.push(projected)
|
|
304
|
+
}
|
|
305
|
+
dashboardRow = enrichIntegrationRows([dashboardRow, ...children], records)[0]!
|
|
306
|
+
}
|
|
307
|
+
}
|
|
282
308
|
}
|
|
283
309
|
return {
|
|
284
310
|
detail: detailFromFacts(record, facts, opts.now),
|
|
@@ -293,11 +319,10 @@ export async function getRepositoryStatus(
|
|
|
293
319
|
): Promise<RepositoryStatus> {
|
|
294
320
|
return withOperatorView(store, repo, 'journal', async (view) => {
|
|
295
321
|
const { dispatcher } = await readDispatcherLiveness(store, repo, now)
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
)
|
|
322
|
+
const facts = (await readRepositoryFacts(view, repo)).value
|
|
323
|
+
const status = repositoryStatusFromFacts(repo, facts, dispatcher)
|
|
324
|
+
const capacity = await readRepositoryCapacity(store, repo, facts, dispatcher, now)
|
|
325
|
+
return { ...status, ...(capacity ? { capacity } : {}) }
|
|
301
326
|
})
|
|
302
327
|
}
|
|
303
328
|
|
|
@@ -347,7 +372,7 @@ async function dashboardFromView(
|
|
|
347
372
|
// the event log regenerates, so the response equals a full replay's.
|
|
348
373
|
const digests = await readBuildDigests(view, opts.repo)
|
|
349
374
|
const projected: DashboardBuild[] = []
|
|
350
|
-
|
|
375
|
+
const capacityBuilds: CapacityBuild[] = []
|
|
351
376
|
for (const record of records) {
|
|
352
377
|
if (record.repo !== opts.repo) continue
|
|
353
378
|
const digest = digests.get(record.slug)
|
|
@@ -360,7 +385,7 @@ async function dashboardFromView(
|
|
|
360
385
|
// Reduced status is `done`/`aborted` exactly when a terminal fact exists,
|
|
361
386
|
// so `terminal === undefined` is exactly the old active test — no history
|
|
362
387
|
// read needed for the count.
|
|
363
|
-
|
|
388
|
+
|
|
364
389
|
if (digest.terminal === 'done') continue
|
|
365
390
|
// Both query surfaces share the `projectsNoDashboardRow` gate (AUT-486
|
|
366
391
|
// snapshot, AUT-496 detail query): a build that projects no row —
|
|
@@ -371,6 +396,14 @@ async function dashboardFromView(
|
|
|
371
396
|
// digest and the reducer cannot silently diverge. Every row-rendering
|
|
372
397
|
// build still gets its facts and pinned pipeline.
|
|
373
398
|
const facts = await view.buildFacts(record.slug)
|
|
399
|
+
capacityBuilds.push({
|
|
400
|
+
record,
|
|
401
|
+
state: facts.state,
|
|
402
|
+
workspace: facts.workspace !== null,
|
|
403
|
+
provisioning:
|
|
404
|
+
facts.state.kind === 'node' &&
|
|
405
|
+
(await readBuildFacts(view, record.slug)).value.provisionMarker !== undefined,
|
|
406
|
+
})
|
|
374
407
|
if (projectsNoDashboardRow(facts.state)) continue
|
|
375
408
|
const pinned = await readPinnedConfig(view, record.slug, config)
|
|
376
409
|
const row = projectBuildFromFacts(
|
|
@@ -396,12 +429,19 @@ async function dashboardFromView(
|
|
|
396
429
|
...forgeReadinessWarnings(status),
|
|
397
430
|
...(status.warningNotice !== undefined ? [status.warningNotice] : []),
|
|
398
431
|
]
|
|
432
|
+
const capacityProjection = dispatchCapacity(
|
|
433
|
+
capacityBuilds,
|
|
434
|
+
config.capacity,
|
|
435
|
+
opts.clock(),
|
|
436
|
+
migrationIdentity(repositoryEvents.ticketMigrations, config.tickets.source),
|
|
437
|
+
)
|
|
399
438
|
const model = buildDashboardFromProjected(
|
|
400
|
-
projected,
|
|
439
|
+
enrichIntegrationRows(projected, records),
|
|
401
440
|
{
|
|
402
441
|
repo: opts.repo,
|
|
403
442
|
queued: status.queued ?? 0,
|
|
404
|
-
activeCount,
|
|
443
|
+
activeCount: capacityProjection.occupied,
|
|
444
|
+
capacityProjection,
|
|
405
445
|
capacity: config.capacity,
|
|
406
446
|
observationCount,
|
|
407
447
|
observationLimit: config.policy.harvestThreshold,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { requestNodeRestack } from './restack'
|
|
1
2
|
import { listOperatorLandings } from './landings'
|
|
2
3
|
import { getOperatorTicketTree } from './tickets'
|
|
3
4
|
import { openOperatorTickets } from './tickets'
|
|
@@ -573,9 +574,24 @@ export const TOOLS: readonly ToolEntry[] = [
|
|
|
573
574
|
}
|
|
574
575
|
},
|
|
575
576
|
),
|
|
577
|
+
defineTool(
|
|
578
|
+
'builds.restack',
|
|
579
|
+
'Request a node restack onto its parent. Paused or blocked nodes retain demand until normal safety gates permit execution; refuses leaves, unopened and terminal nodes.',
|
|
580
|
+
buildDetailInput,
|
|
581
|
+
'{slug, request, coalesced, waiting}: a durable request receipt; execution is asynchronous.',
|
|
582
|
+
async (raw, ctx) => {
|
|
583
|
+
const input = raw as { repo: string; slug: string }
|
|
584
|
+
return requestNodeRestack({
|
|
585
|
+
store: ctx.store,
|
|
586
|
+
...input,
|
|
587
|
+
user: attributed(ctx),
|
|
588
|
+
...(ctx.via ? { via: ctx.via } : {}),
|
|
589
|
+
})
|
|
590
|
+
},
|
|
591
|
+
),
|
|
576
592
|
defineTool(
|
|
577
593
|
'builds.control',
|
|
578
|
-
'Request a durable control for one active build: pause/cancel-pause, resume, hold or land — or the destructive abort and discard. Land requires a ready candidate; hold withdraws landing consent.',
|
|
594
|
+
'Pause immediately suspends a live agent session. Resume continues where stopped when supported; remote and unsupported sessions rerun fresh. Request a durable control for one active build: pause/cancel-pause, resume, hold or land — or the destructive abort and discard. Land requires a ready candidate; hold withdraws landing consent.',
|
|
579
595
|
buildControlInput,
|
|
580
596
|
'Either {kind: "command", slug, command, event} for an accepted control, or {kind: "answer-required", slug, escalationIds} when a resume needs its open escalations answered first.',
|
|
581
597
|
async (raw, ctx) => {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto'
|
|
2
|
+
import { humanActor, type Via } from '../events/envelope'
|
|
3
|
+
import { readBuildFacts } from '../store/reduced-reads'
|
|
4
|
+
import type { BuildStore } from '../store/types'
|
|
5
|
+
import { requireRouteBuild, RouteRefusalError } from './requests'
|
|
6
|
+
|
|
7
|
+
/** Request only: ordinary dispatcher safety gates own execution. */
|
|
8
|
+
export async function requestNodeRestack(input: {
|
|
9
|
+
store: BuildStore
|
|
10
|
+
repo: string
|
|
11
|
+
slug: string
|
|
12
|
+
user: string
|
|
13
|
+
via?: Via
|
|
14
|
+
}) {
|
|
15
|
+
const { store, repo, slug } = input
|
|
16
|
+
await requireRouteBuild(store, repo, slug)
|
|
17
|
+
for (;;) {
|
|
18
|
+
const state = (await readBuildFacts(store, slug)).value.state
|
|
19
|
+
const refuse = (error: string): never => {
|
|
20
|
+
throw new RouteRefusalError({ kind: 'conflict', error })
|
|
21
|
+
}
|
|
22
|
+
if (state.kind !== 'node') refuse(`build "${slug}" is not a node; leaves restack automatically`)
|
|
23
|
+
if (
|
|
24
|
+
state.status === 'done' ||
|
|
25
|
+
state.status === 'aborted' ||
|
|
26
|
+
state.prState === 'merged' ||
|
|
27
|
+
state.prState === 'closed'
|
|
28
|
+
)
|
|
29
|
+
refuse(`node "${slug}" is terminal; restack requires an open node`)
|
|
30
|
+
if (!state.nodeOpened || !state.baseBranch) refuse(`node "${slug}" has no open branch yet`)
|
|
31
|
+
const branch = state.baseBranch!
|
|
32
|
+
const parent =
|
|
33
|
+
state.nodeRestack?.observedParent?.sha ??
|
|
34
|
+
state.nodeComparison?.parentSha ??
|
|
35
|
+
state.nodeRestack?.contributionBase ??
|
|
36
|
+
state.nodeOpened!.sha
|
|
37
|
+
const existing = Object.values(state.nodeRestack?.requests ?? {}).find(
|
|
38
|
+
(request) =>
|
|
39
|
+
request.reason === 'operator' && request.branch === branch && request.parent === parent,
|
|
40
|
+
)
|
|
41
|
+
const waiting = state.status === 'paused' || state.status === 'blocked'
|
|
42
|
+
if (existing) return { slug, request: existing, coalesced: true, waiting }
|
|
43
|
+
const request = { id: randomUUID(), reason: 'operator' as const, branch, parent }
|
|
44
|
+
const event = await store.appendIfCurrent(slug, state.lastSeq, {
|
|
45
|
+
actor: humanActor(input.user, input.via),
|
|
46
|
+
type: 'node.restack-requested',
|
|
47
|
+
payload: request,
|
|
48
|
+
})
|
|
49
|
+
if (event) return { slug, request, coalesced: false, waiting }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
currentTicketRef,
|
|
3
|
+
readTicketMigrations,
|
|
4
|
+
resolveTicketRef,
|
|
5
|
+
} from '../kernel/ticket-migrations'
|
|
1
6
|
import { updateTicketTarget } from '../kernel/node-parent'
|
|
2
7
|
import { projectTicketTree, compatibleTicketSource } from '../ports/tickets/tree'
|
|
3
8
|
import { readBuildFacts } from '../store/reduced-reads'
|
|
@@ -117,31 +122,31 @@ async function matchingBuild(
|
|
|
117
122
|
source: TicketSource,
|
|
118
123
|
configuredSource: string,
|
|
119
124
|
): Promise<OperatorTicketBuild | null> {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
(record.ticket?.source === source.name || (hosted && record.ticket?.source === 'hosted')),
|
|
127
|
-
)
|
|
128
|
-
const matches = candidates.filter((record) => record.ticket!.id === id)
|
|
129
|
-
// The service database store always projects current ids, even when there is
|
|
130
|
-
// no matching build. Only a hosted client over an unprojected legacy store
|
|
131
|
-
// needs fallback lookups; failure must not undo a mutation.
|
|
132
|
-
if (matches.length === 0 && source.name === 'hosted') {
|
|
133
|
-
const identities = new Map<string, string>()
|
|
125
|
+
const candidates = await store.listBuildsForRepo(repo)
|
|
126
|
+
if (!candidates.length) return null
|
|
127
|
+
const migrations = await readTicketMigrations(store, repo)
|
|
128
|
+
const normalized = []
|
|
129
|
+
for (const record of candidates) {
|
|
130
|
+
if (!record.ticket) continue
|
|
134
131
|
try {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
132
|
+
const ref = resolveTicketRef(
|
|
133
|
+
migrations,
|
|
134
|
+
record.ticket,
|
|
135
|
+
source.name === 'database' && configuredSource === 'hosted' ? 'hosted' : source.name,
|
|
136
|
+
record.slug,
|
|
137
|
+
)
|
|
138
|
+
normalized.push({ record, ref })
|
|
139
|
+
} catch {
|
|
140
|
+
/* unrelated historical source has no current ticket association */
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const matches = normalized.filter(({ ref }) => ref.id === id).map(({ record }) => record)
|
|
144
|
+
if (!matches.length && source.name === 'hosted') {
|
|
145
|
+
try {
|
|
146
|
+
for (const { record, ref } of normalized)
|
|
147
|
+
if ((await source.get(ref.id))?.ref.id === id) matches.push(record)
|
|
143
148
|
} catch {
|
|
144
|
-
|
|
149
|
+
/* optional alias association must not undo a successful mutation */
|
|
145
150
|
}
|
|
146
151
|
}
|
|
147
152
|
const projected = await Promise.all(
|
|
@@ -273,9 +278,8 @@ export async function prepareOperatorTicketAssets(opts: {
|
|
|
273
278
|
throw new Error('ticket operator backend is not configured')
|
|
274
279
|
}
|
|
275
280
|
const { context, source } = await openOperatorTickets({ ...opts, backend: opts.backend })
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
return preparePinnedAssets(source, opts.store, opts.repo, opts.ref.id)
|
|
281
|
+
const ref = await currentTicketRef(opts.store, opts.repo, context.tickets.source, opts.ref)
|
|
282
|
+
return preparePinnedAssets(source, opts.store, opts.repo, ref.id)
|
|
279
283
|
}
|
|
280
284
|
|
|
281
285
|
export async function listOperatorTicketStates(opts: {
|
|
@@ -48,8 +48,10 @@ export {
|
|
|
48
48
|
CONTRACT_RETRYABLE_FAILURE,
|
|
49
49
|
CONTRACT_SKILL,
|
|
50
50
|
describeAgentRunnerContract,
|
|
51
|
+
describeNativeResumeContract,
|
|
51
52
|
} from '../ports/runner/contract'
|
|
52
53
|
export type {
|
|
54
|
+
NativeResumeContractFixture,
|
|
53
55
|
AgentRunnerContractFactory,
|
|
54
56
|
AgentRunnerContractHarness,
|
|
55
57
|
AgentRunnerContractOneShotHarness,
|
|
@@ -159,6 +161,12 @@ export {
|
|
|
159
161
|
checkTicketRevision,
|
|
160
162
|
} from '../ports/tickets/revision'
|
|
161
163
|
export { FakeWorkspaceProvider } from '../ports/workspace/fake'
|
|
164
|
+
export { ForgeFailure, isForgeFailure } from '../ports/forge-failure'
|
|
165
|
+
export type {
|
|
166
|
+
ForgeFailureDetails,
|
|
167
|
+
ForgeRequestContext,
|
|
168
|
+
ForgeRequestObserver,
|
|
169
|
+
} from '../ports/forge-failure'
|
|
162
170
|
export { FakeForge } from '../ports/forge/fake'
|
|
163
171
|
// ScriptContext + defaultTurnResult are the scripted fake's own API: the
|
|
164
172
|
// script callback's context type and its default turn result (needed by the
|
|
@@ -242,3 +250,5 @@ export type {
|
|
|
242
250
|
ReducerValueStorage,
|
|
243
251
|
ValueCacheRow,
|
|
244
252
|
} from '../store/reducer-values'
|
|
253
|
+
|
|
254
|
+
export { resumeAgent } from '../ports/runner/native-session'
|
|
@@ -15,7 +15,7 @@ import type {
|
|
|
15
15
|
} from '../ports/workspace/provider-capabilities'
|
|
16
16
|
|
|
17
17
|
/** Version of the in-process plugin contract exposed by `@defrex/autobuild/plugin-sdk`. */
|
|
18
|
-
export const PLUGIN_API_VERSION = '1.
|
|
18
|
+
export const PLUGIN_API_VERSION = '1.8.0' as const
|
|
19
19
|
|
|
20
20
|
/** Context supplied when a registered adapter or contract fixture is selected. */
|
|
21
21
|
export interface PluginFactoryContext<Config = Record<string, unknown>> {
|
|
@@ -90,6 +90,17 @@ async function pushAndOpen(harness: ForgeContractHarness): Promise<{
|
|
|
90
90
|
*/
|
|
91
91
|
export function describeForgeContract(name: string, factory: ForgeContractFactory): void {
|
|
92
92
|
describe(`Forge contract: ${name}`, () => {
|
|
93
|
+
test('optional request observation registers and disposes without requiring legacy adapters', async () => {
|
|
94
|
+
await withForge(factory, undefined, async ({ forge }) => {
|
|
95
|
+
if (!forge.observeRequests) return
|
|
96
|
+
const stop = forge.observeRequests((context) => {
|
|
97
|
+
expect(context.build === undefined || typeof context.build === 'string').toBe(true)
|
|
98
|
+
})
|
|
99
|
+
expect(typeof stop).toBe('function')
|
|
100
|
+
stop()
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
|
|
93
104
|
test('optional node refs open empty without a PR and retries preserve their head', async () => {
|
|
94
105
|
await withForge(factory, undefined, async (h) => {
|
|
95
106
|
const forge = h.forge
|
|
@@ -168,6 +179,18 @@ export function describeForgeContract(name: string, factory: ForgeContractFactor
|
|
|
168
179
|
expect(pr.number).toBeGreaterThan(0)
|
|
169
180
|
expect(pr.url.trim()).not.toBe('')
|
|
170
181
|
expect(pr.headSha).toBe(remoteHead)
|
|
182
|
+
expect(harness.forge.confirmPublication).toBeDefined()
|
|
183
|
+
expect(
|
|
184
|
+
await harness.forge.confirmPublication!(harness.workspacePath, harness.head, remoteHead),
|
|
185
|
+
).toBe(true)
|
|
186
|
+
expect(
|
|
187
|
+
await harness.forge.confirmPublication!(
|
|
188
|
+
harness.workspacePath,
|
|
189
|
+
harness.head,
|
|
190
|
+
'0'.repeat(40),
|
|
191
|
+
),
|
|
192
|
+
).toBe(false)
|
|
193
|
+
expect(await harness.controls.remoteHead(harness.head)).toBe(remoteHead)
|
|
171
194
|
|
|
172
195
|
const retry = await harness.forge.openPr({
|
|
173
196
|
workspacePath: harness.workspacePath,
|