@defrex/autobuild 1.4.1 → 1.5.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 +1 -1
- package/SPEC.md +440 -95
- package/bin/ab-dispatch-kernel.ts +1 -0
- package/docs/accounts.md +9 -0
- package/docs/agent-runtimes.md +1 -0
- package/docs/answering-blocked-builds.md +2 -1
- package/docs/architecture.md +290 -130
- package/docs/assets/headline-wide.png +0 -0
- package/docs/build-store.md +33 -3
- package/docs/cli.md +2 -1
- package/docs/configuration-overview.md +9 -0
- package/docs/configuration.md +166 -101
- package/docs/dispatcher-hosting.md +19 -3
- package/docs/dispatcher.md +9 -4
- package/docs/integration-overview.md +2 -2
- package/docs/integration-tree.md +91 -28
- package/docs/merge-policy.md +28 -9
- package/docs/operator-api.md +43 -18
- package/docs/operator-surfaces.md +1 -1
- package/docs/plugin-authoring.md +85 -8
- package/docs/remote-store-protocol.md +25 -7
- package/docs/remote-ticket-protocol.md +126 -12
- package/docs/restacking.md +20 -6
- package/docs/seams.md +2 -2
- package/docs/setup.md +19 -13
- package/docs/spec-standard.md +2 -1
- package/docs/ticket-dependencies.md +26 -8
- package/docs/ticket-migration.md +70 -7
- package/docs/ticket-sources.md +82 -5
- package/docs/tickets.md +34 -2
- package/docs/troubleshooting.md +2 -2
- package/docs/verification.md +5 -5
- package/docs/website.md +8 -0
- package/docs/workspaces.md +1 -1
- package/package.json +5 -4
- package/packages/core/src/accounts/hosted-readiness.ts +21 -0
- package/packages/core/src/cli/attention.ts +1 -0
- package/packages/core/src/cli/build-control.ts +36 -12
- package/packages/core/src/cli/connect.ts +9 -18
- package/packages/core/src/cli/context.ts +44 -0
- package/packages/core/src/cli/dashboard/configuration.ts +11 -0
- package/packages/core/src/cli/dashboard/model.ts +40 -10
- package/packages/core/src/cli/dashboard/queue.ts +21 -0
- package/packages/core/src/cli/dashboard/render.ts +40 -22
- package/packages/core/src/cli/dispatch-frontend.ts +63 -30
- package/packages/core/src/cli/dispatch-mode.ts +35 -16
- package/packages/core/src/cli/dispatch-repository-feed.ts +40 -11
- package/packages/core/src/cli/dispatch.ts +154 -47
- package/packages/core/src/cli/help.ts +59 -22
- package/packages/core/src/cli/init-hosted-accounts.ts +54 -0
- package/packages/core/src/cli/init-readiness-remote.ts +16 -3
- package/packages/core/src/cli/init-validation.ts +144 -42
- package/packages/core/src/cli/issue-links.ts +67 -0
- package/packages/core/src/cli/main.ts +32 -15
- package/packages/core/src/cli/pr-summary-publication.ts +38 -7
- package/packages/core/src/cli/publication-settlement.ts +36 -24
- package/packages/core/src/cli/repository-status.ts +201 -49
- package/packages/core/src/cli/status.ts +41 -3
- package/packages/core/src/cli/terminals.ts +37 -2
- package/packages/core/src/cli/ticket-editor.ts +20 -6
- package/packages/core/src/cli/ticket.ts +264 -46
- package/packages/core/src/cli/triage-count-sampler.ts +59 -0
- package/packages/core/src/cli/watch.ts +4 -0
- package/packages/core/src/config/live.ts +45 -4
- package/packages/core/src/config/load.ts +9 -0
- package/packages/core/src/config/pipeline-source.ts +6 -2
- package/packages/core/src/config/ready-assignee.ts +86 -0
- package/packages/core/src/config/schema.ts +164 -36
- package/packages/core/src/distribution-packaging.ts +1 -1
- package/packages/core/src/events/catalog.ts +5 -0
- package/packages/core/src/events/compatibility.ts +2 -1
- package/packages/core/src/events/payloads.ts +70 -0
- package/packages/core/src/events/policy.ts +8 -0
- package/packages/core/src/events/repository.ts +91 -28
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +41 -0
- package/packages/core/src/kernel/build-identity.ts +12 -0
- package/packages/core/src/kernel/change-presence.ts +139 -6
- package/packages/core/src/kernel/dispatch-capacity.ts +80 -14
- package/packages/core/src/kernel/dispatch-status.ts +10 -1
- package/packages/core/src/kernel/dispatch-upgrade.ts +104 -5
- package/packages/core/src/kernel/engine.ts +4 -2
- package/packages/core/src/kernel/finalize-pr-rejection.ts +95 -0
- package/packages/core/src/kernel/generators/repository-journals.ts +15 -1
- package/packages/core/src/kernel/harvest.ts +4 -1
- package/packages/core/src/kernel/integration-completeness.ts +104 -17
- package/packages/core/src/kernel/integration-landing.ts +17 -0
- package/packages/core/src/kernel/integration-state.ts +17 -0
- package/packages/core/src/kernel/issue-keywords.ts +202 -0
- package/packages/core/src/kernel/janitor-failure.ts +11 -0
- package/packages/core/src/kernel/kernel-git.ts +87 -0
- package/packages/core/src/kernel/landing-readiness.ts +25 -17
- package/packages/core/src/kernel/log-index.ts +1 -1
- package/packages/core/src/kernel/node-issue-links.ts +142 -0
- package/packages/core/src/kernel/node-parent.ts +6 -0
- package/packages/core/src/kernel/node-restack-transaction.ts +2 -0
- package/packages/core/src/kernel/pr-summary.ts +24 -0
- package/packages/core/src/kernel/read-deferrals.ts +75 -12
- package/packages/core/src/kernel/read-facts.ts +32 -1
- package/packages/core/src/kernel/reconcile-restack.ts +1 -1
- package/packages/core/src/kernel/reducer-registry.ts +31 -1
- package/packages/core/src/kernel/reducer.ts +90 -2
- package/packages/core/src/kernel/ticket-preparation.ts +12 -0
- package/packages/core/src/kernel/verify-budget.ts +43 -0
- package/packages/core/src/operator/index.ts +3 -1
- package/packages/core/src/operator/presentation.ts +3 -0
- package/packages/core/src/operator/protocol.ts +38 -2
- package/packages/core/src/operator/query.ts +66 -29
- package/packages/core/src/operator/registry.ts +47 -26
- package/packages/core/src/operator/tickets.ts +77 -10
- package/packages/core/src/plugin-sdk/index.ts +13 -0
- package/packages/core/src/plugins/manifest.ts +1 -1
- package/packages/core/src/plugins/registry.ts +1 -0
- package/packages/core/src/ports/forge/contract.ts +69 -0
- package/packages/core/src/ports/forge/create.ts +5 -0
- package/packages/core/src/ports/forge/fake.ts +184 -3
- package/packages/core/src/ports/forge/git-rewrite.ts +4 -2
- package/packages/core/src/ports/forge/github.ts +175 -38
- package/packages/core/src/ports/forge/local-git.ts +14 -0
- package/packages/core/src/ports/forge/readiness.ts +10 -0
- package/packages/core/src/ports/forge-failure.ts +43 -0
- package/packages/core/src/ports/runner/claude.ts +7 -1
- package/packages/core/src/ports/runner/codex.ts +7 -2
- package/packages/core/src/ports/runner/native-cli-fixture.ts +2 -1
- package/packages/core/src/ports/runner/pi.ts +7 -1
- package/packages/core/src/ports/runner/runtime.ts +3 -0
- package/packages/core/src/ports/runner/start-prompt.ts +37 -0
- package/packages/core/src/ports/tickets/contract.ts +320 -7
- package/packages/core/src/ports/tickets/create.ts +72 -17
- package/packages/core/src/ports/tickets/fake.ts +18 -0
- package/packages/core/src/ports/tickets/file-codec.ts +20 -0
- package/packages/core/src/ports/tickets/file.ts +43 -1
- package/packages/core/src/ports/tickets/github-fake.ts +1123 -0
- package/packages/core/src/ports/tickets/github-issues.ts +431 -0
- package/packages/core/src/ports/tickets/github-validators.ts +194 -0
- package/packages/core/src/ports/tickets/github.ts +2029 -0
- package/packages/core/src/ports/tickets/hosted-index.ts +34 -3
- package/packages/core/src/ports/tickets/issue-links.ts +86 -0
- package/packages/core/src/ports/tickets/lifecycle.ts +60 -4
- package/packages/core/src/ports/tickets/linear.ts +66 -6
- package/packages/core/src/ports/tickets/migration.ts +290 -68
- package/packages/core/src/ports/tickets/operations.ts +98 -12
- package/packages/core/src/ports/tickets/priority.ts +55 -0
- package/packages/core/src/ports/tickets/remote-protocol.ts +195 -29
- package/packages/core/src/ports/tickets/remote.ts +188 -13
- package/packages/core/src/ports/tickets/revision.ts +22 -1
- package/packages/core/src/ports/tickets/states.ts +43 -0
- package/packages/core/src/ports/tickets/tree.ts +58 -12
- package/packages/core/src/ports/tickets/update.ts +12 -2
- package/packages/core/src/ports/types.ts +194 -11
- package/packages/core/src/ports/workspace/commit-preservation.ts +135 -13
- package/packages/core/src/ports/workspace/git-worktree.ts +3 -1
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +132 -27
- package/packages/core/src/processes/build-runner.ts +99 -21
- package/packages/core/src/processes/dispatcher.ts +1080 -533
- package/packages/core/src/processes/execution-no-progress.ts +5 -0
- package/packages/core/src/processes/harvest-runner.ts +17 -8
- package/packages/core/src/processes/harvest.ts +5 -8
- package/packages/core/src/processes/tick-publication.ts +12 -2
- package/packages/core/src/processes/ticket-scan-schedule.ts +78 -0
- package/packages/core/src/processes/workspace-preservation.ts +37 -2
- package/packages/core/src/runtime-identity.ts +10 -2
- package/packages/core/src/scenarios/harness.ts +4 -0
- package/packages/core/src/store/adapter.ts +7 -1
- package/packages/core/src/store/contract.ts +83 -2
- package/packages/core/src/store/digest.ts +32 -1
- package/packages/core/src/store/reducer-value-shapes.json +4187 -3391
- package/packages/core/src/store/remote/protocol.ts +2 -0
- package/packages/core/src/store/remote/released-clients.json +22 -0
- package/packages/core/src/store/remote/released-reducer-values/1.5.0.json +26924 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +2 -0
- package/packages/core/src/store/repo-state-events.ts +2 -0
- package/packages/core/src/store/types.ts +5 -0
- package/packages/core/src/testing/dispatch-read-budget.ts +729 -123
- package/packages/core/src/testing/index.ts +18 -1
- package/packages/core/src/testing/presence-history.ts +79 -0
- package/packages/core/src/testing/reduced-read-budget.ts +1197 -31
- package/packages/core/src/testing/upgrade-generations.ts +77 -0
- package/skills/code-review/SKILL.md +4 -3
- package/skills/finalize/SKILL.md +18 -2
- package/skills/guide/SKILL.md +382 -139
- package/skills/guide/references/accounts.md +9 -0
- package/skills/guide/references/integration-tree.md +91 -28
- package/skills/guide/references/merge-policy.md +28 -9
- package/skills/guide/references/operator-api.md +43 -18
- package/skills/guide/references/plugin-authoring.md +85 -8
- package/skills/guide/references/remote-store-protocol.md +25 -7
- package/skills/guide/references/remote-ticket-protocol.md +126 -12
- package/skills/guide/references/restacking.md +20 -6
- package/skills/guide/references/setup.md +19 -13
- package/skills/guide/references/spec-standard.md +2 -1
- package/skills/guide/references/ticket-dependencies.md +26 -8
- package/skills/guide/references/ticket-migration.md +70 -7
- package/skills/harvest-review/SKILL.md +4 -3
- package/skills/implement/SKILL.md +20 -1
- package/skills/operate/SKILL.md +103 -28
- package/skills/plan/SKILL.md +1 -1
- package/skills/reconcile/SKILL.md +5 -4
- package/skills/spec/SKILL.md +15 -2
- package/skills/tickets/SKILL.md +114 -37
- package/templates/autobuild.toml +5 -0
- package/templates/hosted-service/package.json +2 -2
|
@@ -46,7 +46,7 @@ async function execOrThrow(
|
|
|
46
46
|
* invariant, not a local detail: the `patchedDependencies` rule in
|
|
47
47
|
* `tools/workspace-manifest-check.ts` rejects a root manifest whose packed
|
|
48
48
|
* dependency set contains a patched package, and the negative control in
|
|
49
|
-
* `packages/core/src/plugin-sdk/package.test.ts` (the packed-distribution
|
|
49
|
+
* `packages/core/src/plugin-sdk/package.integration.test.ts` (the packed-distribution
|
|
50
50
|
* better-auth canary) pins the consumed-manifest failure shape this strip
|
|
51
51
|
* guards, so removing the field from this list fails the suite loudly.
|
|
52
52
|
*
|
|
@@ -92,6 +92,8 @@ export const allowedActorKinds: Record<EventType, readonly ActorKind[]> = {
|
|
|
92
92
|
'node.rewritten': ['kernel', 'dispatcher'],
|
|
93
93
|
'node.writer-settled': ['kernel', 'dispatcher'],
|
|
94
94
|
'node.contribution-recorded': ['kernel', 'dispatcher'],
|
|
95
|
+
'node.issue-links-recorded': ['kernel', 'dispatcher'],
|
|
96
|
+
'node.issue-links-published': ['kernel', 'dispatcher'],
|
|
95
97
|
'node.inventory': ['kernel', 'dispatcher'],
|
|
96
98
|
'node.opened': ['dispatcher'],
|
|
97
99
|
'node.poll-checked': ['dispatcher'],
|
|
@@ -194,6 +196,8 @@ export const allowedActorKinds: Record<EventType, readonly ActorKind[]> = {
|
|
|
194
196
|
'reconcile.rewritten': ['kernel', 'dispatcher'],
|
|
195
197
|
'reconcile.completed': ['agent', 'dispatcher', 'kernel'],
|
|
196
198
|
|
|
199
|
+
'issue-link.downgraded': ['agent'],
|
|
200
|
+
'issue-links.sealed': ['kernel'],
|
|
197
201
|
'observation.recorded': ['kernel', 'agent'],
|
|
198
202
|
'escalation.raised': ['agent', 'kernel', 'dispatcher'],
|
|
199
203
|
// Answering an escalation is always a deliberate human act. Historical
|
|
@@ -202,6 +206,7 @@ export const allowedActorKinds: Record<EventType, readonly ActorKind[]> = {
|
|
|
202
206
|
'escalation.answered': ['human'],
|
|
203
207
|
'phase.failed': ['kernel'],
|
|
204
208
|
'session.build-read-failed': ['kernel'],
|
|
209
|
+
'session.build-read-recovered': ['kernel'],
|
|
205
210
|
'phase.deferred': ['kernel'],
|
|
206
211
|
'phase.deferral-escalated': ['kernel'],
|
|
207
212
|
}
|
|
@@ -24,7 +24,8 @@ export interface StoredEvent {
|
|
|
24
24
|
|
|
25
25
|
/** Change this revision whenever projection semantics change without new types. */
|
|
26
26
|
// Revision 3 retains optional billing-account descriptors in session/attempt projections.
|
|
27
|
-
|
|
27
|
+
// Revision 4 retains the optional effective prompt in session projections.
|
|
28
|
+
export const READ_DECODER_REVISION = 4
|
|
28
29
|
export function catalogIdentity(
|
|
29
30
|
build: Record<string, string> = buildEventPolicy,
|
|
30
31
|
repository: Record<string, string> = repositoryEventPolicy,
|
|
@@ -16,6 +16,7 @@ import { nativeSessionHandleSchema } from './native-session'
|
|
|
16
16
|
*/
|
|
17
17
|
import { z } from 'zod'
|
|
18
18
|
import { landingRuleSchema } from '../config/landing'
|
|
19
|
+
import { refineUniqueIssues } from '../ports/tickets/issue-links'
|
|
19
20
|
import {
|
|
20
21
|
artifactRefSchema,
|
|
21
22
|
buildOutcomeSchema,
|
|
@@ -127,6 +128,8 @@ const autoMergeDefaultObserved = z.strictObject({
|
|
|
127
128
|
defaultSeq: z.number().int().positive(),
|
|
128
129
|
})
|
|
129
130
|
const round = z.number().int().positive()
|
|
131
|
+
/** A forge issue number, shared by every issue-link fact. */
|
|
132
|
+
const issueNumber = z.number().int().positive().max(Number.MAX_SAFE_INTEGER)
|
|
130
133
|
const attempt = z.number().int().positive()
|
|
131
134
|
const dispatchStage = z.enum(['create', 'workspace', 'spec', 'comment', 'branch', 'launch'])
|
|
132
135
|
const infrastructureOperation = z.enum([
|
|
@@ -332,6 +335,18 @@ export const eventPayloadSchemas = {
|
|
|
332
335
|
/** Ticket assets frozen at claim time. Omitted when the ticket had none
|
|
333
336
|
* and in historical logs. */
|
|
334
337
|
assets: z.array(pinnedAssetSchema).optional(),
|
|
338
|
+
/** The ticket's forge issue links frozen at claim time; later ticket
|
|
339
|
+
* edits never change them. Omitted when the ticket had none and in
|
|
340
|
+
* historical logs. */
|
|
341
|
+
issueLinks: z
|
|
342
|
+
.array(
|
|
343
|
+
z.strictObject({
|
|
344
|
+
issue: issueNumber,
|
|
345
|
+
intent: z.enum(['closes', 'refs']),
|
|
346
|
+
}),
|
|
347
|
+
)
|
|
348
|
+
.superRefine(refineUniqueIssues)
|
|
349
|
+
.optional(),
|
|
335
350
|
}),
|
|
336
351
|
'node.opening': z.strictObject({
|
|
337
352
|
branch: z.string().min(1),
|
|
@@ -456,6 +471,30 @@ export const eventPayloadSchemas = {
|
|
|
456
471
|
z.string().regex(/^(?:build:[a-z0-9][a-z0-9-]*|foreign:[0-9a-f]{40}(?:[0-9a-f]{24})?)$/),
|
|
457
472
|
),
|
|
458
473
|
}),
|
|
474
|
+
/** A landed child's effective issue links, recorded once per child on its
|
|
475
|
+
* target node: a leaf's links with downgrade provenance, or a nested
|
|
476
|
+
* node's own union. The node's reducer folds them into its union. */
|
|
477
|
+
'node.issue-links-recorded': z.strictObject({
|
|
478
|
+
build: z.string().min(1),
|
|
479
|
+
issueLinks: z
|
|
480
|
+
.array(
|
|
481
|
+
z.strictObject({
|
|
482
|
+
issue: issueNumber,
|
|
483
|
+
intent: z.enum(['closes', 'refs']),
|
|
484
|
+
downgraded: z.literal(true).optional(),
|
|
485
|
+
}),
|
|
486
|
+
)
|
|
487
|
+
.min(1)
|
|
488
|
+
.superRefine(refineUniqueIssues),
|
|
489
|
+
}),
|
|
490
|
+
/** The root node's PR body was confirmed by readback to carry exactly
|
|
491
|
+
* these keyword lines. */
|
|
492
|
+
'node.issue-links-published': z.strictObject({
|
|
493
|
+
pr: z.number().int().positive(),
|
|
494
|
+
issueLinks: z
|
|
495
|
+
.array(z.strictObject({ issue: issueNumber, intent: z.enum(['closes', 'refs']) }))
|
|
496
|
+
.superRefine(refineUniqueIssues),
|
|
497
|
+
}),
|
|
459
498
|
'node.inventory': z.strictObject({
|
|
460
499
|
head: z.string().min(1),
|
|
461
500
|
base: z.string().min(1).optional(),
|
|
@@ -583,6 +622,12 @@ export const eventPayloadSchemas = {
|
|
|
583
622
|
remote: z.boolean().optional(),
|
|
584
623
|
branch: z.string().min(1),
|
|
585
624
|
base: workspaceBaseSchema,
|
|
625
|
+
/** Preserved branch heads not restored over the branch: already
|
|
626
|
+
* contained, or superseded by a recorded rewrite in the bounded record. */
|
|
627
|
+
restorationSkipped: z
|
|
628
|
+
.array(z.strictObject({ sha: gitOid, reason: z.enum(['contained', 'superseded']) }))
|
|
629
|
+
.min(1)
|
|
630
|
+
.optional(),
|
|
586
631
|
}),
|
|
587
632
|
'workspace.cleanup-required': z.strictObject({
|
|
588
633
|
provider: z.string().min(1),
|
|
@@ -935,6 +980,11 @@ export const eventPayloadSchemas = {
|
|
|
935
980
|
stream: z.string().min(1).optional(),
|
|
936
981
|
/** Present only when this target substituted for the preceding failed one. */
|
|
937
982
|
substitution: providerSubstitutionSchema.optional(),
|
|
983
|
+
/** Effective first message this bracket sends the model: the runtime's
|
|
984
|
+
* skill invocation for a fresh start, the continuation message for a live
|
|
985
|
+
* continue, the interruption notice for a native resume. Absent on
|
|
986
|
+
* historical events and when the runtime cannot report it. */
|
|
987
|
+
prompt: z.string().min(1).optional(),
|
|
938
988
|
}),
|
|
939
989
|
'session.suspended': z.strictObject({
|
|
940
990
|
session: z.string().min(1),
|
|
@@ -1233,6 +1283,15 @@ export const eventPayloadSchemas = {
|
|
|
1233
1283
|
]),
|
|
1234
1284
|
|
|
1235
1285
|
// ── Cross-cutting ──────────────────────────────────────────────────────────
|
|
1286
|
+
/** An agent found the build only partly resolves a linked `closes` issue.
|
|
1287
|
+
* One-way: no fact can express an upgrade. Inert once links are sealed. */
|
|
1288
|
+
'issue-link.downgraded': z.strictObject({
|
|
1289
|
+
issue: issueNumber,
|
|
1290
|
+
reason: z.string().trim().min(1),
|
|
1291
|
+
}),
|
|
1292
|
+
/** The kernel fixed the build's issue links before its first PR side
|
|
1293
|
+
* effect; later downgrades are inert. */
|
|
1294
|
+
'issue-links.sealed': z.strictObject({}),
|
|
1236
1295
|
'observation.recorded': z.strictObject({
|
|
1237
1296
|
id: z.string().min(1),
|
|
1238
1297
|
kind: observationKindSchema,
|
|
@@ -1272,6 +1331,17 @@ export const eventPayloadSchemas = {
|
|
|
1272
1331
|
reason: z.literal('own-build-read'),
|
|
1273
1332
|
diagnostic: z.string().trim().min(1),
|
|
1274
1333
|
}),
|
|
1334
|
+
/** A later own-build read in the same session succeeded after `failureSeq`,
|
|
1335
|
+
* the chain's latest classified failure. */
|
|
1336
|
+
'session.build-read-recovered': z.strictObject({
|
|
1337
|
+
session: z.string().min(1),
|
|
1338
|
+
phase: phaseSchema,
|
|
1339
|
+
round,
|
|
1340
|
+
operation: z.literal('context'),
|
|
1341
|
+
reason: z.literal('own-build-read'),
|
|
1342
|
+
evidenceSeq: z.number().int().positive(),
|
|
1343
|
+
failureSeq: z.number().int().positive(),
|
|
1344
|
+
}),
|
|
1275
1345
|
'phase.deferred': z.strictObject({
|
|
1276
1346
|
session: z.string().min(1),
|
|
1277
1347
|
phase: phaseSchema,
|
|
@@ -60,6 +60,8 @@ export const buildEventPolicy = {
|
|
|
60
60
|
'node.rewritten': 'decisive',
|
|
61
61
|
'node.writer-settled': 'decisive',
|
|
62
62
|
'node.contribution-recorded': 'decisive',
|
|
63
|
+
'node.issue-links-recorded': 'decisive',
|
|
64
|
+
'node.issue-links-published': 'advisory',
|
|
63
65
|
'node.inventory': 'decisive',
|
|
64
66
|
'node.opened': 'decisive',
|
|
65
67
|
'node.compared': 'decisive',
|
|
@@ -152,11 +154,14 @@ export const buildEventPolicy = {
|
|
|
152
154
|
'reconcile.publish-intended': 'decisive',
|
|
153
155
|
'reconcile.rewritten': 'decisive',
|
|
154
156
|
'reconcile.completed': 'decisive',
|
|
157
|
+
'issue-link.downgraded': 'decisive',
|
|
158
|
+
'issue-links.sealed': 'decisive',
|
|
155
159
|
'observation.recorded': 'advisory',
|
|
156
160
|
'escalation.raised': 'decisive',
|
|
157
161
|
'escalation.answered': 'decisive',
|
|
158
162
|
'phase.failed': 'decisive',
|
|
159
163
|
'session.build-read-failed': 'decisive',
|
|
164
|
+
'session.build-read-recovered': 'decisive',
|
|
160
165
|
'phase.deferred': 'decisive',
|
|
161
166
|
'phase.deferral-escalated': 'decisive',
|
|
162
167
|
} satisfies Record<EventType, FactClassification>
|
|
@@ -236,10 +241,13 @@ export const repositoryEventPolicy = {
|
|
|
236
241
|
'dispatcher.ticket-source-dependency-limited': 'decisive',
|
|
237
242
|
'dispatcher.forge-degraded': 'decisive',
|
|
238
243
|
'dispatcher.forge-recovered': 'decisive',
|
|
244
|
+
'dispatcher.kernel-git-unavailable': 'advisory',
|
|
245
|
+
'dispatcher.kernel-git-recovered': 'advisory',
|
|
239
246
|
'dispatcher.ticket-source-degraded': 'decisive',
|
|
240
247
|
'dispatcher.ticket-source-recovered': 'decisive',
|
|
241
248
|
'dispatcher.tick-failed': 'decisive',
|
|
242
249
|
'dispatcher.runner-settled': 'decisive',
|
|
250
|
+
'dispatcher.summary-handoff': 'advisory',
|
|
243
251
|
'dispatcher.harvest-runner-failed': 'decisive',
|
|
244
252
|
'dispatcher.upgrade-available': 'advisory',
|
|
245
253
|
'dispatcher.operator-reported': 'advisory',
|
|
@@ -557,6 +557,8 @@ export const dispatcherStatusEventPayloadSchemas = {
|
|
|
557
557
|
pid: z.number().int().positive(),
|
|
558
558
|
host: z.string().trim().min(1).optional(),
|
|
559
559
|
effectiveConfig: artifactRefSchema,
|
|
560
|
+
/** Startup configuration warnings: role keys, plus forge capability gaps
|
|
561
|
+
* such as missing cross-store branch protection. */
|
|
560
562
|
roleWarnings: boundedDiagnostics,
|
|
561
563
|
}),
|
|
562
564
|
'dispatcher.stop-requested': z.strictObject({ run: dispatchRun, signal: z.string().min(1) }),
|
|
@@ -602,6 +604,9 @@ export const dispatcherStatusEventPayloadSchemas = {
|
|
|
602
604
|
/** Replay-only compatibility for journals written while the isolated
|
|
603
605
|
* dispatcher child transported a display sample in its tick fact. */
|
|
604
606
|
observations: z.number().int().nonnegative().optional(),
|
|
607
|
+
/** Display-only standing count of the configured triage state, sampled
|
|
608
|
+
* only for interactive dashboards; absent means unknown. */
|
|
609
|
+
triage: z.number().int().nonnegative().optional(),
|
|
605
610
|
counters: tickCountersSchema,
|
|
606
611
|
blockedDiagnostics: boundedDiagnostics.optional(),
|
|
607
612
|
janitorDiagnostics: boundedDiagnostics,
|
|
@@ -617,6 +622,13 @@ export const dispatcherStatusEventPayloadSchemas = {
|
|
|
617
622
|
status: z.string().min(1).optional(),
|
|
618
623
|
error: z.string().min(1).optional(),
|
|
619
624
|
}),
|
|
625
|
+
/** A clean remote guest exit whose only cause is an unsettled PR-summary
|
|
626
|
+
* request; routine, never a warning. */
|
|
627
|
+
'dispatcher.summary-handoff': z.strictObject({
|
|
628
|
+
run: dispatchRun,
|
|
629
|
+
slug: z.string().min(1),
|
|
630
|
+
status: z.string().min(1).optional(),
|
|
631
|
+
}),
|
|
620
632
|
'dispatcher.harvest-runner-failed': z.strictObject({
|
|
621
633
|
run: dispatchRun,
|
|
622
634
|
error: z.string().min(1),
|
|
@@ -646,6 +658,7 @@ export const dispatcherSettingEventPayloadSchemas = {
|
|
|
646
658
|
effectiveChanged: z.boolean(),
|
|
647
659
|
run: dispatchRun.optional(),
|
|
648
660
|
effectiveConfig: artifactRefSchema.optional(),
|
|
661
|
+
/** Same startup warnings as `dispatcher.run-started`, re-derived on reload. */
|
|
649
662
|
roleWarnings: boundedDiagnostics.optional(),
|
|
650
663
|
}),
|
|
651
664
|
/** Current repository-wide intake gate sampled by every dispatcher tick. */
|
|
@@ -684,39 +697,70 @@ export const ticketSourceHealthEventPayloadSchemas = {
|
|
|
684
697
|
}),
|
|
685
698
|
} as const
|
|
686
699
|
|
|
687
|
-
const
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
)
|
|
695
|
-
identities: z
|
|
696
|
-
.array(z.templateLiteral(['build:', z.string().regex(/^[a-z0-9][a-z0-9-]*$/)]))
|
|
700
|
+
const presenceSha = z.string().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/)
|
|
701
|
+
const presenceIdentity = z
|
|
702
|
+
.string()
|
|
703
|
+
.regex(/^(?:build:[a-z0-9][a-z0-9-]*|foreign:[0-9a-f]{40}(?:[0-9a-f]{24})?)$/)
|
|
704
|
+
const presenceBuild = z.templateLiteral(['build:', z.string().regex(/^[a-z0-9][a-z0-9-]*$/)])
|
|
705
|
+
const sortedUnique = <T extends z.ZodType<string>>(item: T, name: string) =>
|
|
706
|
+
z
|
|
707
|
+
.array(item)
|
|
697
708
|
.refine(
|
|
698
709
|
(ids) => ids.every((id, index) => index === 0 || ids[index - 1]! < id),
|
|
699
|
-
|
|
700
|
-
)
|
|
710
|
+
`${name} must be sorted and unique`,
|
|
711
|
+
)
|
|
712
|
+
|
|
713
|
+
/** Historical v1 full-history witness. Still decoded, no longer written. */
|
|
714
|
+
const presenceWitnessSchema = z.strictObject({
|
|
715
|
+
version: z.literal(1),
|
|
716
|
+
commits: sortedUnique(presenceSha, 'commits'),
|
|
717
|
+
identities: sortedUnique(presenceBuild, 'identities'),
|
|
701
718
|
})
|
|
702
719
|
|
|
703
|
-
/**
|
|
720
|
+
/** Query-scoped probe: only the proof closure of `questions` is recorded. */
|
|
721
|
+
const presenceProbeSchema = z
|
|
722
|
+
.strictObject({
|
|
723
|
+
version: z.literal(1),
|
|
724
|
+
questions: sortedUnique(presenceIdentity, 'questions'),
|
|
725
|
+
commits: sortedUnique(presenceSha, 'commits'),
|
|
726
|
+
reachable: sortedUnique(presenceSha, 'reachable'),
|
|
727
|
+
builds: sortedUnique(presenceBuild, 'builds'),
|
|
728
|
+
trailers: sortedUnique(presenceBuild, 'trailers'),
|
|
729
|
+
})
|
|
730
|
+
.superRefine((probe, ctx) => {
|
|
731
|
+
const commits = new Set(probe.commits)
|
|
732
|
+
if (!probe.reachable.every((sha) => commits.has(sha)))
|
|
733
|
+
ctx.addIssue({ code: 'custom', path: ['reachable'], message: 'reachable must be tested' })
|
|
734
|
+
const builds = new Set<string>(probe.builds)
|
|
735
|
+
if (!probe.trailers.every((id) => builds.has(id)))
|
|
736
|
+
ctx.addIssue({ code: 'custom', path: ['trailers'], message: 'trailers must be tested' })
|
|
737
|
+
})
|
|
738
|
+
|
|
739
|
+
/** Head-bound admission evidence. New observations carry a query-scoped
|
|
740
|
+
* `probe`, so payload size is bounded by the queried proof closure rather
|
|
741
|
+
* than the destination's history; `witness` is historical v1 evidence.
|
|
742
|
+
* Historical observations remain append-only. */
|
|
704
743
|
export const changePresenceEventPayloadSchemas = {
|
|
705
|
-
'change-presence.observed': z
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
.
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
)
|
|
719
|
-
|
|
744
|
+
'change-presence.observed': z
|
|
745
|
+
.strictObject({
|
|
746
|
+
witness: presenceWitnessSchema.optional(),
|
|
747
|
+
probe: presenceProbeSchema.optional(),
|
|
748
|
+
branch: z.string().min(1),
|
|
749
|
+
destination: z.string().min(1),
|
|
750
|
+
head: presenceSha,
|
|
751
|
+
evidence: z.string().min(1),
|
|
752
|
+
identities: sortedUnique(presenceIdentity, 'identities'),
|
|
753
|
+
})
|
|
754
|
+
.superRefine((payload, ctx) => {
|
|
755
|
+
if (!payload.probe) return
|
|
756
|
+
const questions = new Set<string>(payload.probe.questions)
|
|
757
|
+
if (!payload.identities.every((id) => questions.has(id)))
|
|
758
|
+
ctx.addIssue({
|
|
759
|
+
code: 'custom',
|
|
760
|
+
path: ['identities'],
|
|
761
|
+
message: 'identities must be probe questions',
|
|
762
|
+
})
|
|
763
|
+
}),
|
|
720
764
|
} as const
|
|
721
765
|
|
|
722
766
|
export const forgeHealthEventPayloadSchemas = {
|
|
@@ -732,6 +776,19 @@ export const forgeHealthEventPayloadSchemas = {
|
|
|
732
776
|
}),
|
|
733
777
|
} as const
|
|
734
778
|
|
|
779
|
+
/** The dispatcher could not execute Git for kernel-side node work. One event
|
|
780
|
+
* opens the repository condition and one closes it; node janitors defer while
|
|
781
|
+
* it is active instead of each recording failed attempts. */
|
|
782
|
+
export const kernelGitHealthEventPayloadSchemas = {
|
|
783
|
+
'dispatcher.kernel-git-unavailable': z.strictObject({
|
|
784
|
+
executable: z.string().min(1),
|
|
785
|
+
detail: z.string().min(1).max(1_000),
|
|
786
|
+
}),
|
|
787
|
+
'dispatcher.kernel-git-recovered': z.strictObject({
|
|
788
|
+
executable: z.string().min(1),
|
|
789
|
+
}),
|
|
790
|
+
} as const
|
|
791
|
+
|
|
735
792
|
export const ticketMigrationEventPayloadSchemas = {
|
|
736
793
|
'tickets.migration-recorded': z
|
|
737
794
|
.strictObject({
|
|
@@ -822,6 +879,7 @@ export const repositoryEventPayloadSchemas = {
|
|
|
822
879
|
...ticketPreparationEventPayloadSchemas,
|
|
823
880
|
...ticketMigrationEventPayloadSchemas,
|
|
824
881
|
...forgeHealthEventPayloadSchemas,
|
|
882
|
+
...kernelGitHealthEventPayloadSchemas,
|
|
825
883
|
...changePresenceEventPayloadSchemas,
|
|
826
884
|
...ticketSourceHealthEventPayloadSchemas,
|
|
827
885
|
...harvestEventPayloadSchemas,
|
|
@@ -844,6 +902,8 @@ export const REPOSITORY_ATTENTION_EVENTS = [
|
|
|
844
902
|
'harvest.failed',
|
|
845
903
|
'dispatcher.forge-degraded',
|
|
846
904
|
'dispatcher.forge-recovered',
|
|
905
|
+
'dispatcher.kernel-git-unavailable',
|
|
906
|
+
'dispatcher.kernel-git-recovered',
|
|
847
907
|
'dispatcher.ticket-source-degraded',
|
|
848
908
|
'dispatcher.ticket-source-recovered',
|
|
849
909
|
'dispatcher.tick-failed',
|
|
@@ -968,10 +1028,13 @@ const allowedActorKinds: Record<RepositoryEventType, readonly ActorKind[]> = {
|
|
|
968
1028
|
'dispatcher.ticket-source-dependency-limited': ['dispatcher'],
|
|
969
1029
|
'dispatcher.forge-degraded': ['dispatcher', 'kernel'],
|
|
970
1030
|
'dispatcher.forge-recovered': ['dispatcher', 'kernel', 'human'],
|
|
1031
|
+
'dispatcher.kernel-git-unavailable': ['dispatcher'],
|
|
1032
|
+
'dispatcher.kernel-git-recovered': ['dispatcher'],
|
|
971
1033
|
'dispatcher.ticket-source-degraded': ['dispatcher'],
|
|
972
1034
|
'dispatcher.ticket-source-recovered': ['dispatcher'],
|
|
973
1035
|
'dispatcher.tick-failed': ['dispatcher'],
|
|
974
1036
|
'dispatcher.runner-settled': ['dispatcher'],
|
|
1037
|
+
'dispatcher.summary-handoff': ['dispatcher'],
|
|
975
1038
|
'dispatcher.harvest-runner-failed': ['dispatcher'],
|
|
976
1039
|
'dispatcher.upgrade-available': ['dispatcher'],
|
|
977
1040
|
'dispatcher.operator-reported': ['human'],
|
|
@@ -250,6 +250,7 @@
|
|
|
250
250
|
"$.completed.payload.queued: number",
|
|
251
251
|
"$.completed.payload.run: string",
|
|
252
252
|
"$.completed.payload.ticketDiagnostics: array",
|
|
253
|
+
"$.completed.payload.triage: number",
|
|
253
254
|
"$.completed.payload: object",
|
|
254
255
|
"$.completed.repo: string",
|
|
255
256
|
"$.completed.seq: number",
|
|
@@ -340,6 +341,7 @@
|
|
|
340
341
|
"$.tick.payload.queued: number",
|
|
341
342
|
"$.tick.payload.run: string",
|
|
342
343
|
"$.tick.payload.ticketDiagnostics: array",
|
|
344
|
+
"$.tick.payload.triage: number",
|
|
343
345
|
"$.tick.payload: object",
|
|
344
346
|
"$.tick.repo: string",
|
|
345
347
|
"$.tick.seq: number",
|
|
@@ -1269,6 +1271,11 @@
|
|
|
1269
1271
|
"$.health.active.source: string",
|
|
1270
1272
|
"$.health.active: object",
|
|
1271
1273
|
"$.health: object",
|
|
1274
|
+
"$.kernelGit.active.detail: string",
|
|
1275
|
+
"$.kernelGit.active.executable: string",
|
|
1276
|
+
"$.kernelGit.active.since: string",
|
|
1277
|
+
"$.kernelGit.active: object",
|
|
1278
|
+
"$.kernelGit: object",
|
|
1272
1279
|
"$.latestHarvestResumedSeq: number",
|
|
1273
1280
|
"$.latestRun: string",
|
|
1274
1281
|
"$.latestStoppedRun: string",
|
|
@@ -1340,6 +1347,7 @@
|
|
|
1340
1347
|
"$.recentRuns[][].completed.payload.queued: number",
|
|
1341
1348
|
"$.recentRuns[][].completed.payload.run: string",
|
|
1342
1349
|
"$.recentRuns[][].completed.payload.ticketDiagnostics: array",
|
|
1350
|
+
"$.recentRuns[][].completed.payload.triage: number",
|
|
1343
1351
|
"$.recentRuns[][].completed.payload: object",
|
|
1344
1352
|
"$.recentRuns[][].completed.repo: string",
|
|
1345
1353
|
"$.recentRuns[][].completed.seq: number",
|
|
@@ -1430,6 +1438,7 @@
|
|
|
1430
1438
|
"$.recentRuns[][].tick.payload.queued: number",
|
|
1431
1439
|
"$.recentRuns[][].tick.payload.run: string",
|
|
1432
1440
|
"$.recentRuns[][].tick.payload.ticketDiagnostics: array",
|
|
1441
|
+
"$.recentRuns[][].tick.payload.triage: number",
|
|
1433
1442
|
"$.recentRuns[][].tick.payload: object",
|
|
1434
1443
|
"$.recentRuns[][].tick.repo: string",
|
|
1435
1444
|
"$.recentRuns[][].tick.seq: number",
|
|
@@ -1478,6 +1487,7 @@
|
|
|
1478
1487
|
"$.status.roleWarnings: array",
|
|
1479
1488
|
"$.status.roleWarnings[]: string",
|
|
1480
1489
|
"$.status.run: string",
|
|
1490
|
+
"$.status.triage: number",
|
|
1481
1491
|
"$.status.warningNotice: string",
|
|
1482
1492
|
"$.status.warningNotice: undefined",
|
|
1483
1493
|
"$.status.yieldedHolder: undefined",
|
|
@@ -2030,6 +2040,8 @@
|
|
|
2030
2040
|
"$.build.infrastructureFailures[].seq: number",
|
|
2031
2041
|
"$.build.infrastructureFailures[].workspaceRef: string",
|
|
2032
2042
|
"$.build.infrastructureFailures[]: object",
|
|
2043
|
+
"$.build.issueLinks: array",
|
|
2044
|
+
"$.build.issueLinksSealedSeq: number",
|
|
2033
2045
|
"$.build.janitor.attempt: number",
|
|
2034
2046
|
"$.build.janitor.attention: boolean",
|
|
2035
2047
|
"$.build.janitor.firstFailureAt: string",
|
|
@@ -2208,6 +2220,7 @@
|
|
|
2208
2220
|
"$.build.lastEvent.payload.environmentId: string",
|
|
2209
2221
|
"$.build.lastEvent.payload.error: string",
|
|
2210
2222
|
"$.build.lastEvent.payload.escalation: number",
|
|
2223
|
+
"$.build.lastEvent.payload.executable: string",
|
|
2211
2224
|
"$.build.lastEvent.payload.execution: string",
|
|
2212
2225
|
"$.build.lastEvent.payload.exitStatus: number",
|
|
2213
2226
|
"$.build.lastEvent.payload.failed.commit: string",
|
|
@@ -2531,6 +2544,7 @@
|
|
|
2531
2544
|
"$.build.openSessions[].model: undefined",
|
|
2532
2545
|
"$.build.openSessions[].nativeHandle: undefined",
|
|
2533
2546
|
"$.build.openSessions[].phase: string",
|
|
2547
|
+
"$.build.openSessions[].prompt: undefined",
|
|
2534
2548
|
"$.build.openSessions[].role: string",
|
|
2535
2549
|
"$.build.openSessions[].round: number",
|
|
2536
2550
|
"$.build.openSessions[].runner: string",
|
|
@@ -2616,6 +2630,8 @@
|
|
|
2616
2630
|
"$.build.pollingActivity.dispatcher.handoff-completed: string",
|
|
2617
2631
|
"$.build.pollingActivity.dispatcher.handoff-started: string",
|
|
2618
2632
|
"$.build.pollingActivity.dispatcher.intake-set: string",
|
|
2633
|
+
"$.build.pollingActivity.dispatcher.kernel-git-recovered: string",
|
|
2634
|
+
"$.build.pollingActivity.dispatcher.kernel-git-unavailable: string",
|
|
2619
2635
|
"$.build.pollingActivity.dispatcher.operator-reported: string",
|
|
2620
2636
|
"$.build.pollingActivity.dispatcher.pause-set: string",
|
|
2621
2637
|
"$.build.pollingActivity.dispatcher.placement-set: string",
|
|
@@ -2624,6 +2640,7 @@
|
|
|
2624
2640
|
"$.build.pollingActivity.dispatcher.run-stopped: string",
|
|
2625
2641
|
"$.build.pollingActivity.dispatcher.runtime-recorded: string",
|
|
2626
2642
|
"$.build.pollingActivity.dispatcher.runtime-rolled-back: string",
|
|
2643
|
+
"$.build.pollingActivity.dispatcher.summary-handoff: string",
|
|
2627
2644
|
"$.build.pollingActivity.dispatcher.takeover: string",
|
|
2628
2645
|
"$.build.pollingActivity.dispatcher.target-prepared: string",
|
|
2629
2646
|
"$.build.pollingActivity.dispatcher.terminal-released: string",
|
|
@@ -3192,6 +3209,8 @@
|
|
|
3192
3209
|
"$.build.infrastructureFailures[].seq: number",
|
|
3193
3210
|
"$.build.infrastructureFailures[].workspaceRef: string",
|
|
3194
3211
|
"$.build.infrastructureFailures[]: object",
|
|
3212
|
+
"$.build.issueLinks: array",
|
|
3213
|
+
"$.build.issueLinksSealedSeq: number",
|
|
3195
3214
|
"$.build.janitor.attempt: number",
|
|
3196
3215
|
"$.build.janitor.attention: boolean",
|
|
3197
3216
|
"$.build.janitor.firstFailureAt: string",
|
|
@@ -3370,6 +3389,7 @@
|
|
|
3370
3389
|
"$.build.lastEvent.payload.environmentId: string",
|
|
3371
3390
|
"$.build.lastEvent.payload.error: string",
|
|
3372
3391
|
"$.build.lastEvent.payload.escalation: number",
|
|
3392
|
+
"$.build.lastEvent.payload.executable: string",
|
|
3373
3393
|
"$.build.lastEvent.payload.execution: string",
|
|
3374
3394
|
"$.build.lastEvent.payload.exitStatus: number",
|
|
3375
3395
|
"$.build.lastEvent.payload.failed.commit: string",
|
|
@@ -3693,6 +3713,7 @@
|
|
|
3693
3713
|
"$.build.openSessions[].model: undefined",
|
|
3694
3714
|
"$.build.openSessions[].nativeHandle: undefined",
|
|
3695
3715
|
"$.build.openSessions[].phase: string",
|
|
3716
|
+
"$.build.openSessions[].prompt: undefined",
|
|
3696
3717
|
"$.build.openSessions[].role: string",
|
|
3697
3718
|
"$.build.openSessions[].round: number",
|
|
3698
3719
|
"$.build.openSessions[].runner: string",
|
|
@@ -3778,6 +3799,8 @@
|
|
|
3778
3799
|
"$.build.pollingActivity.dispatcher.handoff-completed: string",
|
|
3779
3800
|
"$.build.pollingActivity.dispatcher.handoff-started: string",
|
|
3780
3801
|
"$.build.pollingActivity.dispatcher.intake-set: string",
|
|
3802
|
+
"$.build.pollingActivity.dispatcher.kernel-git-recovered: string",
|
|
3803
|
+
"$.build.pollingActivity.dispatcher.kernel-git-unavailable: string",
|
|
3781
3804
|
"$.build.pollingActivity.dispatcher.operator-reported: string",
|
|
3782
3805
|
"$.build.pollingActivity.dispatcher.pause-set: string",
|
|
3783
3806
|
"$.build.pollingActivity.dispatcher.placement-set: string",
|
|
@@ -3786,6 +3809,7 @@
|
|
|
3786
3809
|
"$.build.pollingActivity.dispatcher.run-stopped: string",
|
|
3787
3810
|
"$.build.pollingActivity.dispatcher.runtime-recorded: string",
|
|
3788
3811
|
"$.build.pollingActivity.dispatcher.runtime-rolled-back: string",
|
|
3812
|
+
"$.build.pollingActivity.dispatcher.summary-handoff: string",
|
|
3789
3813
|
"$.build.pollingActivity.dispatcher.takeover: string",
|
|
3790
3814
|
"$.build.pollingActivity.dispatcher.target-prepared: string",
|
|
3791
3815
|
"$.build.pollingActivity.dispatcher.terminal-released: string",
|
|
@@ -4853,6 +4877,8 @@
|
|
|
4853
4877
|
"$.recoveryCheckpoint.settled: string",
|
|
4854
4878
|
"$.recoveryCheckpoint: object",
|
|
4855
4879
|
"$.remoteWorkspace: boolean",
|
|
4880
|
+
"$.replacedHeads: array",
|
|
4881
|
+
"$.replacedHeads[]: string",
|
|
4856
4882
|
"$.restackHistory: array",
|
|
4857
4883
|
"$.restackHistory[].actor.kind: string",
|
|
4858
4884
|
"$.restackHistory[].actor: object",
|
|
@@ -5948,6 +5974,8 @@
|
|
|
5948
5974
|
"$.infrastructureFailures[].seq: number",
|
|
5949
5975
|
"$.infrastructureFailures[].workspaceRef: string",
|
|
5950
5976
|
"$.infrastructureFailures[]: object",
|
|
5977
|
+
"$.issueLinks: array",
|
|
5978
|
+
"$.issueLinksSealedSeq: number",
|
|
5951
5979
|
"$.janitor.attempt: number",
|
|
5952
5980
|
"$.janitor.attention: boolean",
|
|
5953
5981
|
"$.janitor.firstFailureAt: string",
|
|
@@ -6126,6 +6154,7 @@
|
|
|
6126
6154
|
"$.lastEvent.payload.environmentId: string",
|
|
6127
6155
|
"$.lastEvent.payload.error: string",
|
|
6128
6156
|
"$.lastEvent.payload.escalation: number",
|
|
6157
|
+
"$.lastEvent.payload.executable: string",
|
|
6129
6158
|
"$.lastEvent.payload.execution: string",
|
|
6130
6159
|
"$.lastEvent.payload.exitStatus: number",
|
|
6131
6160
|
"$.lastEvent.payload.failed.commit: string",
|
|
@@ -6449,6 +6478,7 @@
|
|
|
6449
6478
|
"$.openSessions[].model: undefined",
|
|
6450
6479
|
"$.openSessions[].nativeHandle: undefined",
|
|
6451
6480
|
"$.openSessions[].phase: string",
|
|
6481
|
+
"$.openSessions[].prompt: undefined",
|
|
6452
6482
|
"$.openSessions[].role: string",
|
|
6453
6483
|
"$.openSessions[].round: number",
|
|
6454
6484
|
"$.openSessions[].runner: string",
|
|
@@ -6534,6 +6564,8 @@
|
|
|
6534
6564
|
"$.pollingActivity.dispatcher.handoff-completed: string",
|
|
6535
6565
|
"$.pollingActivity.dispatcher.handoff-started: string",
|
|
6536
6566
|
"$.pollingActivity.dispatcher.intake-set: string",
|
|
6567
|
+
"$.pollingActivity.dispatcher.kernel-git-recovered: string",
|
|
6568
|
+
"$.pollingActivity.dispatcher.kernel-git-unavailable: string",
|
|
6537
6569
|
"$.pollingActivity.dispatcher.operator-reported: string",
|
|
6538
6570
|
"$.pollingActivity.dispatcher.pause-set: string",
|
|
6539
6571
|
"$.pollingActivity.dispatcher.placement-set: string",
|
|
@@ -6542,6 +6574,7 @@
|
|
|
6542
6574
|
"$.pollingActivity.dispatcher.run-stopped: string",
|
|
6543
6575
|
"$.pollingActivity.dispatcher.runtime-recorded: string",
|
|
6544
6576
|
"$.pollingActivity.dispatcher.runtime-rolled-back: string",
|
|
6577
|
+
"$.pollingActivity.dispatcher.summary-handoff: string",
|
|
6545
6578
|
"$.pollingActivity.dispatcher.takeover: string",
|
|
6546
6579
|
"$.pollingActivity.dispatcher.target-prepared: string",
|
|
6547
6580
|
"$.pollingActivity.dispatcher.terminal-released: string",
|
|
@@ -6984,6 +7017,7 @@
|
|
|
6984
7017
|
"$.roleWarnings: array",
|
|
6985
7018
|
"$.roleWarnings[]: string",
|
|
6986
7019
|
"$.run: string",
|
|
7020
|
+
"$.triage: number",
|
|
6987
7021
|
"$.warningNotice: string",
|
|
6988
7022
|
"$.warningNotice: undefined",
|
|
6989
7023
|
"$.yieldedHolder: undefined",
|
|
@@ -7045,6 +7079,7 @@
|
|
|
7045
7079
|
"$.merged: string",
|
|
7046
7080
|
"$.mergedSha: undefined",
|
|
7047
7081
|
"$.nodeOpened: boolean",
|
|
7082
|
+
"$.nodeTargets: array",
|
|
7048
7083
|
"$.observations: array",
|
|
7049
7084
|
"$.observations[].seq: number",
|
|
7050
7085
|
"$.observations[].ts: string",
|
|
@@ -7627,6 +7662,7 @@
|
|
|
7627
7662
|
"$.retained[].payload.error: string",
|
|
7628
7663
|
"$.retained[].payload.escalation: number",
|
|
7629
7664
|
"$.retained[].payload.evidence: string",
|
|
7665
|
+
"$.retained[].payload.executable: string",
|
|
7630
7666
|
"$.retained[].payload.execution: string",
|
|
7631
7667
|
"$.retained[].payload.exitStatus: number",
|
|
7632
7668
|
"$.retained[].payload.expected: string",
|
|
@@ -7821,6 +7857,7 @@
|
|
|
7821
7857
|
"$.retained[].payload.stage[]: string",
|
|
7822
7858
|
"$.retained[].payload.startedAt: string",
|
|
7823
7859
|
"$.retained[].payload.startedSeq: number",
|
|
7860
|
+
"$.retained[].payload.status: string",
|
|
7824
7861
|
"$.retained[].payload.step: string",
|
|
7825
7862
|
"$.retained[].payload.stream: string",
|
|
7826
7863
|
"$.retained[].payload.successor: string",
|
|
@@ -7863,6 +7900,7 @@
|
|
|
7863
7900
|
"$.retained[].payload.transcript.kind: string",
|
|
7864
7901
|
"$.retained[].payload.transcript.rev: number",
|
|
7865
7902
|
"$.retained[].payload.transcript: object",
|
|
7903
|
+
"$.retained[].payload.triage: number",
|
|
7866
7904
|
"$.retained[].payload.trigger.build: string",
|
|
7867
7905
|
"$.retained[].payload.trigger.journal: boolean",
|
|
7868
7906
|
"$.retained[].payload.trigger.kind: string",
|
|
@@ -7968,6 +8006,7 @@
|
|
|
7968
8006
|
"$.retained[].payload.environmentId: string",
|
|
7969
8007
|
"$.retained[].payload.error: string",
|
|
7970
8008
|
"$.retained[].payload.evidence: string",
|
|
8009
|
+
"$.retained[].payload.executable: string",
|
|
7971
8010
|
"$.retained[].payload.execution: string",
|
|
7972
8011
|
"$.retained[].payload.firstFailureAt: string",
|
|
7973
8012
|
"$.retained[].payload.forge: string",
|
|
@@ -8042,6 +8081,7 @@
|
|
|
8042
8081
|
"$.retained[].payload.stage: string",
|
|
8043
8082
|
"$.retained[].payload.startedAt: string",
|
|
8044
8083
|
"$.retained[].payload.startedSeq: number",
|
|
8084
|
+
"$.retained[].payload.status: string",
|
|
8045
8085
|
"$.retained[].payload.step: string",
|
|
8046
8086
|
"$.retained[].payload.successor: string",
|
|
8047
8087
|
"$.retained[].payload.suspended: number",
|
|
@@ -8066,6 +8106,7 @@
|
|
|
8066
8106
|
"$.retained[].payload.transcript.kind: string",
|
|
8067
8107
|
"$.retained[].payload.transcript.rev: number",
|
|
8068
8108
|
"$.retained[].payload.transcript: object",
|
|
8109
|
+
"$.retained[].payload.triage: number",
|
|
8069
8110
|
"$.retained[].payload.usage.inputTokens: number",
|
|
8070
8111
|
"$.retained[].payload.usage.outputTokens: number",
|
|
8071
8112
|
"$.retained[].payload.usage.turns: number",
|
|
@@ -53,6 +53,18 @@ function splitTrailers(
|
|
|
53
53
|
return { prefix: content.slice(0, start), trailers }
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/** The message split at its terminal trailer block, by the same rule that
|
|
57
|
+
* reads identity: `body` keeps every byte before the block (including its
|
|
58
|
+
* separator) and `trailers` holds the block's raw lines, or '' when none. */
|
|
59
|
+
export function splitTrailerBlock(
|
|
60
|
+
message: string,
|
|
61
|
+
options: { includesSubject?: boolean } = {},
|
|
62
|
+
): { body: string; trailers: string } {
|
|
63
|
+
const { prefix, trailers } = splitTrailers(message, options.includesSubject !== true)
|
|
64
|
+
if (trailers.length === 0) return { body: message, trailers: '' }
|
|
65
|
+
return { body: prefix, trailers: trailers.map((entry) => entry.raw).join('\n') }
|
|
66
|
+
}
|
|
67
|
+
|
|
56
68
|
export function buildTrailers(message: string): string[] {
|
|
57
69
|
return splitTrailers(message, false)
|
|
58
70
|
.trailers.filter((entry) => entry.key.toLowerCase() === KEY.toLowerCase())
|