@defrex/autobuild 1.11.0 → 1.11.1
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 +1 -1
- package/SPEC.md +9 -3
- package/docs/architecture.md +10 -4
- package/docs/cli.md +1 -1
- package/docs/dispatcher.md +4 -3
- package/docs/operator-surfaces.md +3 -3
- package/package.json +3 -3
- package/packages/core/src/cli/dashboard/header.ts +10 -0
- package/packages/core/src/cli/dashboard/poll.ts +4 -3
- package/packages/core/src/cli/dashboard/render.ts +30 -0
- package/packages/core/src/cli/dispatch-frontend.ts +12 -3
- package/packages/core/src/cli/dispatch.ts +2 -4
- package/packages/core/src/cli/repository-status.ts +8 -6
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +65 -30
- package/packages/core/src/kernel/__snapshots__/reducer-identity-records/46196d8f0076496a.json +97 -0
- package/packages/core/src/kernel/dispatch-status.ts +139 -0
- package/packages/core/src/kernel/read-facts.ts +15 -13
- package/packages/core/src/kernel/reducer-revisions.ts +2 -0
- package/packages/core/src/operator/query.ts +7 -2
- package/packages/core/src/store/reducer-value-shapes.json +3566 -3528
- package/packages/core/src/store/remote/released-clients.json +11 -0
- package/packages/core/src/store/remote/released-reducer-values/1.11.1.json +35718 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +18 -16
- package/packages/core/src/testing/dispatch-journals.ts +117 -0
- package/packages/core/src/web/repository-source.ts +6 -2
- package/skills/guide/SKILL.md +12 -4
- package/templates/hosted-service/package.json +2 -2
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
// Generated release catalog registry. Historical catalogs are immutable evidence.
|
|
2
2
|
import release0 from './1.10.0.json'
|
|
3
3
|
import release1 from './1.11.0.json'
|
|
4
|
-
import release2 from './1.
|
|
5
|
-
import release3 from './1.
|
|
6
|
-
import release4 from './1.
|
|
7
|
-
import release5 from './1.
|
|
8
|
-
import release6 from './1.
|
|
9
|
-
import release7 from './1.
|
|
10
|
-
import release8 from './1.
|
|
11
|
-
import release9 from './1.
|
|
4
|
+
import release2 from './1.11.1.json'
|
|
5
|
+
import release3 from './1.2.0.json'
|
|
6
|
+
import release4 from './1.3.0.json'
|
|
7
|
+
import release5 from './1.4.0.json'
|
|
8
|
+
import release6 from './1.5.0.json'
|
|
9
|
+
import release7 from './1.6.0.json'
|
|
10
|
+
import release8 from './1.7.0.json'
|
|
11
|
+
import release9 from './1.8.0.json'
|
|
12
|
+
import release10 from './1.9.0.json'
|
|
12
13
|
import type { ReducerValueCatalog } from '../../reducer-value-validation'
|
|
13
14
|
export interface ReleasedReducerValues extends ReducerValueCatalog {
|
|
14
15
|
versions: Record<string, number>
|
|
@@ -16,12 +17,13 @@ export interface ReleasedReducerValues extends ReducerValueCatalog {
|
|
|
16
17
|
export const RELEASED_REDUCER_VALUES: Readonly<Record<string, ReleasedReducerValues>> = {
|
|
17
18
|
'1.10.0.json': release0,
|
|
18
19
|
'1.11.0.json': release1,
|
|
19
|
-
'1.
|
|
20
|
-
'1.
|
|
21
|
-
'1.
|
|
22
|
-
'1.
|
|
23
|
-
'1.
|
|
24
|
-
'1.
|
|
25
|
-
'1.
|
|
26
|
-
'1.
|
|
20
|
+
'1.11.1.json': release2,
|
|
21
|
+
'1.2.0.json': release3,
|
|
22
|
+
'1.3.0.json': release4,
|
|
23
|
+
'1.4.0.json': release5,
|
|
24
|
+
'1.5.0.json': release6,
|
|
25
|
+
'1.6.0.json': release7,
|
|
26
|
+
'1.7.0.json': release8,
|
|
27
|
+
'1.8.0.json': release9,
|
|
28
|
+
'1.9.0.json': release10,
|
|
27
29
|
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/** Overlapping dispatcher-run journals for the reported-dispatch-run tests
|
|
2
|
+
* (#1279): hosted cron invocations that yield, and ones that take over. */
|
|
3
|
+
import { DISPATCHER, humanActor } from '../events/envelope'
|
|
4
|
+
import type { RepositoryEvent } from '../events/repository'
|
|
5
|
+
|
|
6
|
+
const COUNTERS = {
|
|
7
|
+
merged: 0,
|
|
8
|
+
closed: 0,
|
|
9
|
+
conflicted: 0,
|
|
10
|
+
abandoned: 0,
|
|
11
|
+
discarded: 0,
|
|
12
|
+
janitorFailed: 0,
|
|
13
|
+
recovered: 0,
|
|
14
|
+
dispatchFailed: 0,
|
|
15
|
+
resumed: 0,
|
|
16
|
+
swept: 0,
|
|
17
|
+
dispatched: 0,
|
|
18
|
+
authored: 0,
|
|
19
|
+
bounced: 0,
|
|
20
|
+
claimRaces: 0,
|
|
21
|
+
invalidTickets: 0,
|
|
22
|
+
dependencyBlocked: 0,
|
|
23
|
+
harvestStarted: 0,
|
|
24
|
+
harvestResumed: 0,
|
|
25
|
+
harvestCompleted: 0,
|
|
26
|
+
harvestEscalated: 0,
|
|
27
|
+
harvestFailed: 0,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Builds a repository journal with consecutive seqs. */
|
|
31
|
+
export function dispatchJournal(repo = '/repo') {
|
|
32
|
+
const events: RepositoryEvent[] = []
|
|
33
|
+
const push = <T extends RepositoryEvent['type']>(
|
|
34
|
+
type: T,
|
|
35
|
+
payload: Extract<RepositoryEvent, { type: T }>['payload'],
|
|
36
|
+
): RepositoryEvent => {
|
|
37
|
+
const seq = events.length + 1
|
|
38
|
+
const event = {
|
|
39
|
+
repo,
|
|
40
|
+
seq,
|
|
41
|
+
ts: new Date(seq * 1_000).toISOString(),
|
|
42
|
+
actor: type === 'dispatcher.operator-reported' ? humanActor('operator') : DISPATCHER,
|
|
43
|
+
type,
|
|
44
|
+
payload,
|
|
45
|
+
} as RepositoryEvent
|
|
46
|
+
events.push(event)
|
|
47
|
+
return event
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
events,
|
|
51
|
+
start: (run: string, rev = 0, roleWarnings: string[] = []) =>
|
|
52
|
+
push('dispatcher.run-started', {
|
|
53
|
+
run,
|
|
54
|
+
pid: 1,
|
|
55
|
+
effectiveConfig: { kind: 'dispatcher-effective-config', rev },
|
|
56
|
+
roleWarnings,
|
|
57
|
+
}),
|
|
58
|
+
tick: (run: string, queued: number, diagnostics: string[] = [], triage?: number) => {
|
|
59
|
+
push('dispatcher.tick-started', { run })
|
|
60
|
+
return push('dispatcher.tick-completed', {
|
|
61
|
+
run,
|
|
62
|
+
queued,
|
|
63
|
+
counters: COUNTERS,
|
|
64
|
+
janitorDiagnostics: diagnostics,
|
|
65
|
+
ticketDiagnostics: [],
|
|
66
|
+
dependencyDiagnostics: [],
|
|
67
|
+
...(triage === undefined ? {} : { triage }),
|
|
68
|
+
})
|
|
69
|
+
},
|
|
70
|
+
forgeFailure: (run: string) =>
|
|
71
|
+
push('dispatcher.forge-readiness-failed', {
|
|
72
|
+
run,
|
|
73
|
+
forge: 'github',
|
|
74
|
+
rootBranch: 'main',
|
|
75
|
+
check: 'squash',
|
|
76
|
+
detail: `${run} cannot squash`,
|
|
77
|
+
remediation: 'enable squash merges',
|
|
78
|
+
}),
|
|
79
|
+
yielded: (run: string, holder: string) => push('dispatcher.tick-yielded', { run, holder }),
|
|
80
|
+
stop: (run: string, outcome: 'normal' | 'abnormal' = 'normal', reason?: 'superseded') =>
|
|
81
|
+
push('dispatcher.run-stopped', {
|
|
82
|
+
run,
|
|
83
|
+
outcome,
|
|
84
|
+
...(reason === undefined ? {} : { reason }),
|
|
85
|
+
}),
|
|
86
|
+
push,
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** Holder A ticks with every start and tick fact; newcomer B starts, yields
|
|
91
|
+
* and stops; A then ticks again with queue 11. Mirrors the flint evidence. */
|
|
92
|
+
export function yieldedNewcomerJournal(): RepositoryEvent[] {
|
|
93
|
+
const j = dispatchJournal()
|
|
94
|
+
j.start('run-a', 0, ['A role warning'])
|
|
95
|
+
j.forgeFailure('run-a')
|
|
96
|
+
j.push('dispatcher.upgrade-available', { run: 'run-a', version: '9.9.9' })
|
|
97
|
+
j.push('dispatcher.operator-reported', { run: 'run-a', level: 'warning', message: 'A notice' })
|
|
98
|
+
j.tick('run-a', 4, ['A first diagnostic'], 3)
|
|
99
|
+
j.start('run-b', 1, ['B role warning'])
|
|
100
|
+
j.yielded('run-b', 'run-a')
|
|
101
|
+
j.stop('run-b')
|
|
102
|
+
j.tick('run-a', 11, ['A later diagnostic'], 3)
|
|
103
|
+
return j.events
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Holder A ticks; newcomer B records its own start facts, then takes over
|
|
107
|
+
* with a tick boundary while A is live; A then stops as superseded. */
|
|
108
|
+
export function takeoverJournal(): RepositoryEvent[] {
|
|
109
|
+
const j = dispatchJournal()
|
|
110
|
+
j.start('run-a', 0, ['A role warning'])
|
|
111
|
+
j.tick('run-a', 4)
|
|
112
|
+
j.start('run-b', 1, ['B role warning'])
|
|
113
|
+
j.forgeFailure('run-b')
|
|
114
|
+
j.tick('run-b', 7)
|
|
115
|
+
j.stop('run-a', 'normal', 'superseded')
|
|
116
|
+
return j.events
|
|
117
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { NO_DISPATCHER_RUN_LINE } from '../cli/dashboard/configuration'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
dispatchWarningLines,
|
|
4
|
+
projectRepositoryHeader,
|
|
5
|
+
repositoryQueueDepth,
|
|
6
|
+
} from '../cli/dashboard/header'
|
|
3
7
|
import type { RepositoryReadFacts } from '../store/reduced-reads'
|
|
4
8
|
import type { WebFrame } from './protocol'
|
|
5
9
|
|
|
@@ -18,7 +22,7 @@ export function projectRepositoryFrame(
|
|
|
18
22
|
const { header } = projectRepositoryHeader(
|
|
19
23
|
{
|
|
20
24
|
repo,
|
|
21
|
-
queued:
|
|
25
|
+
queued: repositoryQueueDepth(facts),
|
|
22
26
|
...(status?.triage !== undefined ? { triage: status.triage } : {}),
|
|
23
27
|
...(status?.availableUpgrade !== undefined
|
|
24
28
|
? { availableUpgrade: status.availableUpgrade }
|
package/skills/guide/SKILL.md
CHANGED
|
@@ -2642,7 +2642,8 @@ Humans may run `ab dispatch --viewer` from a local checkout to watch dispatch
|
|
|
2642
2642
|
elsewhere without taking a lease or starting any dispatch work. The optional
|
|
2643
2643
|
`--dispatched-by <label>` is descriptive input: every frame shows `viewer` or
|
|
2644
2644
|
`viewer · dispatched by <label>`. Plain/non-TTY output prints the same at startup
|
|
2645
|
-
and emits state changes; with `--web`
|
|
2645
|
+
and emits state changes; with `--web` a TTY viewer shows the web UI's URL beside
|
|
2646
|
+
its `viewer` line, and plain/non-TTY output prints only the URL. `--once`
|
|
2646
2647
|
reads one snapshot; `--interval <s>` sets the viewer polling cadence. Startup intake flags and explicit `--repository` are
|
|
2647
2648
|
rejected. With no recorded dispatcher run the viewer says no dispatcher has run
|
|
2648
2649
|
for this project yet; with a run whose effective configuration is not yet
|
|
@@ -2650,7 +2651,11 @@ durable it waits.
|
|
|
2650
2651
|
|
|
2651
2652
|
Viewer uses the dispatch frontend with canonical repository facts for status,
|
|
2652
2653
|
settings, harvest and migrations, bypassing the dispatch presentation event feed
|
|
2653
|
-
and its checkpoints.
|
|
2654
|
+
and its checkpoints. That status, like the web dashboard's and the operator
|
|
2655
|
+
queries', describes the run holding repository authority, or that held it last:
|
|
2656
|
+
an overlapping run that starts, yields and stops never replaces it. A run
|
|
2657
|
+
replaces it by recording a tick boundary, or by starting once it has stopped or
|
|
2658
|
+
before it has ticked. Fresh viewers reuse server reductions; idle refreshes read
|
|
2654
2659
|
zero event rows. Its one ticket-source read is the header's triage count, at
|
|
2655
2660
|
most once per 60 s. It has no child, lease, execution wiring or upgrade-release timer.
|
|
2656
2661
|
All existing shared-store controls remain: merge/hold, build/global pause/resume,
|
|
@@ -2726,7 +2731,9 @@ the configured source's bounded state count itself, at most once per 60 s
|
|
|
2726
2731
|
while it runs. It keeps its last good value through failed reads and through
|
|
2727
2732
|
headless ticks that publish no count, and shows `–` until its first read
|
|
2728
2733
|
succeeds or when the source has no state counts (Linear). `queue` is the
|
|
2729
|
-
ready-ticket queue depth
|
|
2734
|
+
ready-ticket queue depth measured by the latest completed ticket scan,
|
|
2735
|
+
whichever dispatcher run recorded it (0 before any scan), so an overlapping
|
|
2736
|
+
run that starts and yields cannot displace it. `active` is occupied capacity (every unfinished
|
|
2730
2737
|
build except one waiting on tickets, plus finished builds running work again)
|
|
2731
2738
|
against root `capacity`. Observation pressure is not a header counter: the
|
|
2732
2739
|
Harvest row shows a run's observations, and `ab harvest status` reports
|
|
@@ -4110,7 +4117,8 @@ only a dispatcher this session started may be cleanly stopped on request.
|
|
|
4110
4117
|
|
|
4111
4118
|
`ab web [--json]` always permits a read-only browser surface without a dispatcher
|
|
4112
4119
|
lease. `ab dispatch --web` serves the same UI with the dispatcher; `--plain`
|
|
4113
|
-
keeps the URL on stdout and diagnostics on stderr
|
|
4120
|
+
keeps the URL on stdout and diagnostics on stderr, and a TTY dashboard keeps it
|
|
4121
|
+
right-aligned on its top line in every view and across runtime upgrades. Loopback binding is the default;
|
|
4114
4122
|
non-loopback serving has no access control. The overview and build detail show progress,
|
|
4115
4123
|
and each build page ends with that build's timeline. The analytics page
|
|
4116
4124
|
(`/analytics`) shows a Gantt of builds active in a window (24 hours, 7 days,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"build": "ab-hosted-service-build"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@defrex/autobuild-hosted-store-service": "1.11.
|
|
8
|
-
"@defrex/autobuild": "1.11.
|
|
7
|
+
"@defrex/autobuild-hosted-store-service": "1.11.1",
|
|
8
|
+
"@defrex/autobuild": "1.11.1",
|
|
9
9
|
"next": "16.1.6",
|
|
10
10
|
"react": "19.2.4",
|
|
11
11
|
"react-dom": "19.2.4"
|