@defrex/autobuild 1.8.0 → 1.8.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/package.json +3 -3
- package/packages/core/src/kernel/leaf-restack-base.ts +34 -0
- package/packages/core/src/kernel/leaf-restack-state.ts +1 -29
- package/packages/core/src/kernel/ticket-wait.ts +1 -1
- package/packages/core/src/store/remote/released-clients.json +11 -0
- package/templates/hosted-service/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ From the repository you want built, install Autobuild as a development dependenc
|
|
|
26
26
|
<!-- release-install:start -->
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
bun add -d --exact @defrex/autobuild@1.8.
|
|
29
|
+
bun add -d --exact @defrex/autobuild@1.8.1
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- release-install:end -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defrex/autobuild",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "Agent-driven software delivery from groomed ticket to merged PR",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -157,8 +157,8 @@
|
|
|
157
157
|
},
|
|
158
158
|
"devDependencies": {
|
|
159
159
|
"@biomejs/biome": "2.5.5",
|
|
160
|
-
"@defrex/autobuild-postgres-store": "1.8.
|
|
161
|
-
"@defrex/autobuild-vercel-sandbox": "1.8.
|
|
160
|
+
"@defrex/autobuild-postgres-store": "1.8.1",
|
|
161
|
+
"@defrex/autobuild-vercel-sandbox": "1.8.1",
|
|
162
162
|
"@resvg/resvg-js": "2.6.2",
|
|
163
163
|
"@types/bun": "^1.3.14",
|
|
164
164
|
"@types/node": "^24.0.0",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Pure base helpers, kept apart from the leaf restack reducer. The browser
|
|
2
|
+
// dashboard reaches `ticket-wait.ts` through `operator-presentation`, so this
|
|
3
|
+
// module must import only types: the reducer pulls in Bun-only code.
|
|
4
|
+
import type { LeafRestackState } from './leaf-restack-state'
|
|
5
|
+
|
|
6
|
+
/** The target base the leaf's last restack moved it onto: the newer of the
|
|
7
|
+
* last completed restack and the last wait-resume fast-forward, else the
|
|
8
|
+
* provisioned base. Without `restack.advanced` this is exactly
|
|
9
|
+
* `completed?.targetBase ?? initialBase`. */
|
|
10
|
+
export function leafRestackedBase(
|
|
11
|
+
state: Pick<
|
|
12
|
+
LeafRestackState,
|
|
13
|
+
'completed' | 'completedAt' | 'advanced' | 'advancedAt' | 'initialBase'
|
|
14
|
+
>,
|
|
15
|
+
): string | undefined {
|
|
16
|
+
if (state.advanced !== undefined && (state.advancedAt ?? 0) > (state.completedAt ?? 0))
|
|
17
|
+
return state.advanced.to
|
|
18
|
+
return state.completed?.targetBase ?? state.initialBase
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** The base a leaf's published work currently sits on: the last reconcile's
|
|
22
|
+
* base when it is newer than the last restack completion, else
|
|
23
|
+
* `leafRestackedBase`. Shared by target observation and the wait-resume
|
|
24
|
+
* restack decision so the two cannot drift. */
|
|
25
|
+
export function leafBaseInUse(log: {
|
|
26
|
+
restack: LeafRestackState
|
|
27
|
+
lastReconcileCompleted?: { completedSeq: number; baseSha: string }
|
|
28
|
+
}): string | undefined {
|
|
29
|
+
const reconcile = log.lastReconcileCompleted
|
|
30
|
+
return reconcile &&
|
|
31
|
+
reconcile.completedSeq > Math.max(log.restack.completedAt ?? 0, log.restack.advancedAt ?? 0)
|
|
32
|
+
? reconcile.baseSha
|
|
33
|
+
: leafRestackedBase(log.restack)
|
|
34
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AbEvent } from '../events/catalog'
|
|
2
2
|
import type { EventPayload } from '../events/payloads'
|
|
3
3
|
import { defineReducer } from './incremental'
|
|
4
|
+
export { leafBaseInUse, leafRestackedBase } from './leaf-restack-base'
|
|
4
5
|
|
|
5
6
|
export interface LeafRestackState {
|
|
6
7
|
activityAt?: string
|
|
@@ -132,35 +133,6 @@ export function advanceLeafRestack(state: LeafRestackState, events: readonly AbE
|
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
|
-
/** The target base the leaf's last restack moved it onto: the newer of the
|
|
136
|
-
* last completed restack and the last wait-resume fast-forward, else the
|
|
137
|
-
* provisioned base. Without `restack.advanced` this is exactly
|
|
138
|
-
* `completed?.targetBase ?? initialBase`. */
|
|
139
|
-
export function leafRestackedBase(
|
|
140
|
-
state: Pick<
|
|
141
|
-
LeafRestackState,
|
|
142
|
-
'completed' | 'completedAt' | 'advanced' | 'advancedAt' | 'initialBase'
|
|
143
|
-
>,
|
|
144
|
-
): string | undefined {
|
|
145
|
-
if (state.advanced !== undefined && (state.advancedAt ?? 0) > (state.completedAt ?? 0))
|
|
146
|
-
return state.advanced.to
|
|
147
|
-
return state.completed?.targetBase ?? state.initialBase
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/** The base a leaf's published work currently sits on: the last reconcile's
|
|
151
|
-
* base when it is newer than the last restack completion, else
|
|
152
|
-
* `leafRestackedBase`. Shared by target observation and the wait-resume
|
|
153
|
-
* restack decision so the two cannot drift. */
|
|
154
|
-
export function leafBaseInUse(log: {
|
|
155
|
-
restack: LeafRestackState
|
|
156
|
-
lastReconcileCompleted?: { completedSeq: number; baseSha: string }
|
|
157
|
-
}): string | undefined {
|
|
158
|
-
const reconcile = log.lastReconcileCompleted
|
|
159
|
-
return reconcile &&
|
|
160
|
-
reconcile.completedSeq > Math.max(log.restack.completedAt ?? 0, log.restack.advancedAt ?? 0)
|
|
161
|
-
? reconcile.baseSha
|
|
162
|
-
: leafRestackedBase(log.restack)
|
|
163
|
-
}
|
|
164
136
|
|
|
165
137
|
export const leafRestackReducer = defineReducer<LeafRestackState, AbEvent, LeafRestackState>({
|
|
166
138
|
version: 10,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReducedWaitEndCause } from '../events/payloads'
|
|
2
2
|
import type { AnsweredEscalation, BuildState } from './reducer'
|
|
3
3
|
import type { LogIndex } from './log-index'
|
|
4
|
-
import { leafBaseInUse } from './leaf-restack-
|
|
4
|
+
import { leafBaseInUse } from './leaf-restack-base'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Ticket waits (SPEC §11 "Ticket waits"): a phase agent declares with
|
|
@@ -99,5 +99,16 @@
|
|
|
99
99
|
"provenance": {
|
|
100
100
|
"tag": "v1.8.0"
|
|
101
101
|
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"version": "1.8.1",
|
|
105
|
+
"publishedAt": "2026-11-17T15:33:07.950Z",
|
|
106
|
+
"protocol": "7",
|
|
107
|
+
"contract": "1.8.0.json",
|
|
108
|
+
"projects": true,
|
|
109
|
+
"catalogIdentity": "9ba078909b9323a4d0044adacfc3fb005381bb07ca05acaf058e12c0c37da8fb",
|
|
110
|
+
"provenance": {
|
|
111
|
+
"tag": "v1.8.1"
|
|
112
|
+
}
|
|
102
113
|
}
|
|
103
114
|
]
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"build": "ab-hosted-service-build"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@defrex/autobuild-hosted-store-service": "1.8.
|
|
8
|
-
"@defrex/autobuild": "1.8.
|
|
7
|
+
"@defrex/autobuild-hosted-store-service": "1.8.1",
|
|
8
|
+
"@defrex/autobuild": "1.8.1",
|
|
9
9
|
"next": "16.1.6",
|
|
10
10
|
"react": "19.2.4",
|
|
11
11
|
"react-dom": "19.2.4"
|