instar 1.3.938 → 1.3.939
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/dist/core/githubRuntime.d.ts +96 -0
- package/dist/core/githubRuntime.d.ts.map +1 -0
- package/dist/core/githubRuntime.js +213 -0
- package/dist/core/githubRuntime.js.map +1 -0
- package/dist/monitoring/CiFailurePoller.d.ts +30 -1
- package/dist/monitoring/CiFailurePoller.d.ts.map +1 -1
- package/dist/monitoring/CiFailurePoller.js +5 -2
- package/dist/monitoring/CiFailurePoller.js.map +1 -1
- package/dist/monitoring/MergeRunner.d.ts +5 -0
- package/dist/monitoring/MergeRunner.d.ts.map +1 -1
- package/dist/monitoring/MergeRunner.js +10 -2
- package/dist/monitoring/MergeRunner.js.map +1 -1
- package/dist/monitoring/greenPrAutomergeWiring.d.ts +3 -0
- package/dist/monitoring/greenPrAutomergeWiring.d.ts.map +1 -1
- package/dist/monitoring/greenPrAutomergeWiring.js +15 -9
- package/dist/monitoring/greenPrAutomergeWiring.js.map +1 -1
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +2 -1
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/throughputRoutes.d.ts +11 -7
- package/dist/server/throughputRoutes.d.ts.map +1 -1
- package/dist/server/throughputRoutes.js +99 -29
- package/dist/server/throughputRoutes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +3 -3
- package/upgrades/1.3.939.md +33 -0
- package/upgrades/side-effects/throughput-github-runtime-repair.md +155 -0
|
@@ -6,17 +6,18 @@ type Weights = {
|
|
|
6
6
|
quality: number;
|
|
7
7
|
output: number;
|
|
8
8
|
};
|
|
9
|
-
type
|
|
10
|
-
code: number;
|
|
11
|
-
stdout: string;
|
|
12
|
-
stderr: string;
|
|
13
|
-
}>;
|
|
9
|
+
export type ThroughputGraphql = (query: string, variables: Record<string, unknown>) => Promise<unknown>;
|
|
14
10
|
export declare const DEFAULT_THROUGHPUT_WEIGHTS: Weights;
|
|
11
|
+
export declare function pacificDay(iso: string): string;
|
|
15
12
|
/** Canonical server-owned implementation of Echo's throughput-metrics.mjs contract. */
|
|
16
13
|
export declare function buildThroughputSeries(opts: {
|
|
17
14
|
days: 7 | 14 | 30;
|
|
18
15
|
now?: Date;
|
|
19
|
-
|
|
16
|
+
graphql?: ThroughputGraphql;
|
|
17
|
+
stateDir?: string;
|
|
18
|
+
env?: NodeJS.ProcessEnv;
|
|
19
|
+
fetchImpl?: typeof globalThis.fetch;
|
|
20
|
+
resolveToken?: () => string | null;
|
|
20
21
|
weights?: Weights;
|
|
21
22
|
}): Promise<{
|
|
22
23
|
repo: string;
|
|
@@ -46,7 +47,10 @@ export declare function buildThroughputSeries(opts: {
|
|
|
46
47
|
}[];
|
|
47
48
|
}>;
|
|
48
49
|
export declare function createThroughputRoutes(options?: {
|
|
49
|
-
|
|
50
|
+
graphql?: ThroughputGraphql;
|
|
51
|
+
stateDir?: string;
|
|
52
|
+
env?: NodeJS.ProcessEnv;
|
|
53
|
+
fetchImpl?: typeof globalThis.fetch;
|
|
50
54
|
weights?: Weights;
|
|
51
55
|
}): Router;
|
|
52
56
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"throughputRoutes.d.ts","sourceRoot":"","sources":["../../src/server/throughputRoutes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"throughputRoutes.d.ts","sourceRoot":"","sources":["../../src/server/throughputRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA+B,MAAM,SAAS,CAAC;AAgB9D,KAAK,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACzC,KAAK,OAAO,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACpF,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAqBxG,eAAO,MAAM,0BAA0B,EAAE,OAAkE,CAAC;AAsC5G,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG9C;AAiDD,uFAAuF;AACvF,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IAClB,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCA;AAED,wBAAgB,sBAAsB,CAAC,OAAO,GAAE;IAC9C,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACd,GAAG,MAAM,CAwBd"}
|
|
@@ -1,11 +1,30 @@
|
|
|
1
|
-
import { execFile } from 'node:child_process';
|
|
2
1
|
import { Router } from 'express';
|
|
2
|
+
import { createGitHubTokenResolver, fetchGitHubGraphql, GitHubAuthUnavailableError, resolveGitHubToken, } from '../core/githubRuntime.js';
|
|
3
3
|
export const DEFAULT_THROUGHPUT_WEIGHTS = { velocity: .40, speed: .20, quality: .25, output: .15 };
|
|
4
4
|
const WINDOWS = [7, 14, 30];
|
|
5
|
+
const MAX_SEARCH_PAGES = 10;
|
|
6
|
+
const THROUGHPUT_QUERY = `
|
|
7
|
+
query ThroughputPullRequests($query: String!, $cursor: String) {
|
|
8
|
+
search(query: $query, type: ISSUE, first: 100, after: $cursor) {
|
|
9
|
+
issueCount
|
|
10
|
+
nodes {
|
|
11
|
+
... on PullRequest {
|
|
12
|
+
number
|
|
13
|
+
title
|
|
14
|
+
author { login }
|
|
15
|
+
mergedAt
|
|
16
|
+
createdAt
|
|
17
|
+
additions
|
|
18
|
+
deletions
|
|
19
|
+
reviews(first: 30) { nodes { state } }
|
|
20
|
+
commits { totalCount }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
pageInfo { hasNextPage endCursor }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
5
27
|
const ZERO = () => ({ merges: 0, medianLatencyH: 0, reworkLoops: 0, reverts: 0, medianPushIters: 0, medianLoc: 0 });
|
|
6
|
-
function gh(args) {
|
|
7
|
-
return new Promise(resolve => execFile('gh', args, { timeout: 30_000, maxBuffer: 32 * 1024 * 1024 }, (err, stdout, stderr) => resolve({ code: err ? 1 : 0, stdout: stdout ?? '', stderr: stderr ?? '' })));
|
|
8
|
-
}
|
|
9
28
|
function median(values) {
|
|
10
29
|
if (!values.length)
|
|
11
30
|
return 0;
|
|
@@ -14,7 +33,16 @@ function median(values) {
|
|
|
14
33
|
return Math.round((a.length % 2 ? a[m] : (a[m - 1] + a[m]) / 2) * 10) / 10;
|
|
15
34
|
}
|
|
16
35
|
function authorOf(login) { return login === 'JKHeadley' ? 'codey' : login === 'EchoOfDawn' ? 'echo' : 'other'; }
|
|
17
|
-
|
|
36
|
+
const PACIFIC_DAY = new Intl.DateTimeFormat('en-US', {
|
|
37
|
+
timeZone: 'America/Los_Angeles',
|
|
38
|
+
year: 'numeric',
|
|
39
|
+
month: '2-digit',
|
|
40
|
+
day: '2-digit',
|
|
41
|
+
});
|
|
42
|
+
export function pacificDay(iso) {
|
|
43
|
+
const parts = Object.fromEntries(PACIFIC_DAY.formatToParts(new Date(iso)).map((part) => [part.type, part.value]));
|
|
44
|
+
return `${parts.year}-${parts.month}-${parts.day}`;
|
|
45
|
+
}
|
|
18
46
|
function metrics(prs, details) {
|
|
19
47
|
return {
|
|
20
48
|
merges: prs.length,
|
|
@@ -25,38 +53,68 @@ function metrics(prs, details) {
|
|
|
25
53
|
medianLoc: median(prs.map(p => p.additions + p.deletions)),
|
|
26
54
|
};
|
|
27
55
|
}
|
|
28
|
-
async function
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
continue;
|
|
41
|
-
out.set(n, { reworkLoops: (p.reviews?.nodes ?? []).filter((x) => x.state === 'CHANGES_REQUESTED').length, commits: Number(p.commits?.totalCount ?? 0) });
|
|
56
|
+
async function listMergedPullRequests(graphql, cutoff, now) {
|
|
57
|
+
const searchQuery = `repo:JKHeadley/instar is:pr is:merged merged:>=${new Date(cutoff).toISOString().slice(0, 10)} sort:updated-desc`;
|
|
58
|
+
const prs = [];
|
|
59
|
+
let expectedCount = null;
|
|
60
|
+
let fetchedCount = 0;
|
|
61
|
+
let cursor = null;
|
|
62
|
+
for (let page = 0; page < MAX_SEARCH_PAGES; page += 1) {
|
|
63
|
+
const data = await graphql(THROUGHPUT_QUERY, { query: searchQuery, cursor });
|
|
64
|
+
const search = data.search;
|
|
65
|
+
if (!search || !Number.isSafeInteger(search.issueCount) || search.issueCount < 0
|
|
66
|
+
|| !Array.isArray(search.nodes) || !search.pageInfo) {
|
|
67
|
+
throw new Error('github-throughput-invalid-response');
|
|
42
68
|
}
|
|
69
|
+
if (search.issueCount > 1_000)
|
|
70
|
+
throw new Error('github-throughput-result-cap-exceeded');
|
|
71
|
+
if (expectedCount === null)
|
|
72
|
+
expectedCount = search.issueCount;
|
|
73
|
+
if (search.issueCount !== expectedCount)
|
|
74
|
+
throw new Error('github-throughput-count-changed');
|
|
75
|
+
fetchedCount += search.nodes.length;
|
|
76
|
+
prs.push(...search.nodes.filter((pr) => typeof pr?.mergedAt === 'string'
|
|
77
|
+
&& Date.parse(pr.mergedAt) >= cutoff
|
|
78
|
+
&& Date.parse(pr.mergedAt) <= now));
|
|
79
|
+
if (!search.pageInfo.hasNextPage) {
|
|
80
|
+
if (fetchedCount !== expectedCount)
|
|
81
|
+
throw new Error('github-throughput-result-truncated');
|
|
82
|
+
return prs;
|
|
83
|
+
}
|
|
84
|
+
if (typeof search.pageInfo.endCursor !== 'string' || !search.pageInfo.endCursor) {
|
|
85
|
+
throw new Error('github-throughput-invalid-cursor');
|
|
86
|
+
}
|
|
87
|
+
cursor = search.pageInfo.endCursor;
|
|
43
88
|
}
|
|
44
|
-
|
|
89
|
+
throw new Error('github-throughput-page-cap-exceeded');
|
|
45
90
|
}
|
|
46
91
|
/** Canonical server-owned implementation of Echo's throughput-metrics.mjs contract. */
|
|
47
92
|
export async function buildThroughputSeries(opts) {
|
|
48
93
|
const now = opts.now ?? new Date();
|
|
49
|
-
const run = opts.run ?? gh;
|
|
50
94
|
const weights = opts.weights ?? DEFAULT_THROUGHPUT_WEIGHTS;
|
|
51
95
|
const cutoff = now.getTime() - opts.days * 86_400_000;
|
|
52
|
-
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
96
|
+
let graphql = opts.graphql;
|
|
97
|
+
if (!graphql) {
|
|
98
|
+
const token = opts.resolveToken
|
|
99
|
+
? opts.resolveToken()
|
|
100
|
+
: resolveGitHubToken({ stateDir: opts.stateDir, env: opts.env });
|
|
101
|
+
if (!token)
|
|
102
|
+
throw new GitHubAuthUnavailableError();
|
|
103
|
+
graphql = (query, variables) => fetchGitHubGraphql({
|
|
104
|
+
token,
|
|
105
|
+
query,
|
|
106
|
+
variables,
|
|
107
|
+
fetchImpl: opts.fetchImpl,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
const prs = await listMergedPullRequests(graphql, cutoff, now.getTime());
|
|
111
|
+
const details = new Map(prs.map((pr) => [pr.number, {
|
|
112
|
+
reworkLoops: (pr.reviews?.nodes ?? []).filter((review) => review.state === 'CHANGES_REQUESTED').length,
|
|
113
|
+
commits: Number(pr.commits?.totalCount ?? 0),
|
|
114
|
+
}]));
|
|
57
115
|
const days = new Map();
|
|
58
116
|
for (const p of prs)
|
|
59
|
-
days.set(
|
|
117
|
+
days.set(pacificDay(p.mergedAt), [...(days.get(pacificDay(p.mergedAt)) ?? []), p]);
|
|
60
118
|
const rows = [...days].sort(([a], [b]) => a.localeCompare(b)).map(([day, all]) => {
|
|
61
119
|
const authors = {};
|
|
62
120
|
for (const a of ['codey', 'echo', 'other']) {
|
|
@@ -80,6 +138,10 @@ export async function buildThroughputSeries(opts) {
|
|
|
80
138
|
}
|
|
81
139
|
export function createThroughputRoutes(options = {}) {
|
|
82
140
|
const router = Router();
|
|
141
|
+
const resolveToken = createGitHubTokenResolver({
|
|
142
|
+
stateDir: options.stateDir,
|
|
143
|
+
env: options.env,
|
|
144
|
+
});
|
|
83
145
|
router.get('/throughput/series', async (req, res) => {
|
|
84
146
|
const days = Number(req.query.days ?? 14);
|
|
85
147
|
if (!WINDOWS.includes(days)) {
|
|
@@ -87,9 +149,17 @@ export function createThroughputRoutes(options = {}) {
|
|
|
87
149
|
return;
|
|
88
150
|
}
|
|
89
151
|
try {
|
|
90
|
-
res.set('Cache-Control', 'private, max-age=60').json(await buildThroughputSeries({
|
|
152
|
+
res.set('Cache-Control', 'private, max-age=60').json(await buildThroughputSeries({
|
|
153
|
+
days: days,
|
|
154
|
+
...options,
|
|
155
|
+
resolveToken,
|
|
156
|
+
}));
|
|
91
157
|
}
|
|
92
|
-
catch {
|
|
158
|
+
catch (error) {
|
|
159
|
+
if (error instanceof GitHubAuthUnavailableError) {
|
|
160
|
+
res.status(503).json({ error: 'github-auth-unavailable' });
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
93
163
|
res.status(503).json({ error: 'throughput-series-unavailable' });
|
|
94
164
|
}
|
|
95
165
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"throughputRoutes.js","sourceRoot":"","sources":["../../src/server/throughputRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"throughputRoutes.js","sourceRoot":"","sources":["../../src/server/throughputRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA+B,MAAM,SAAS,CAAC;AAC9D,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAiClC,MAAM,CAAC,MAAM,0BAA0B,GAAY,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAC5G,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAU,CAAC;AACrC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;CAoBxB,CAAC;AACF,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;AAEpH,SAAS,MAAM,CAAC,MAAgB;IAC9B,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,CAAC,CAAC;IAC7B,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,C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,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,2BAA2B,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;YAAC,OAAO;QAAC,CAAC;QACvI,IAAI,CAAC;YACH,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAC,IAAI,CAAC,MAAM,qBAAqB,CAAC;gBAC/E,IAAI,EAAE,IAAmB;gBACzB,GAAG,OAAO;gBACV,YAAY;aACb,CAAC,CAAC,CAAC;QACN,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,0BAA0B,EAAE,CAAC;gBAChD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,CAAC,CAAC;gBAC3D,OAAO;YACT,CAAC;YACD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-07-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-07-24T15:21:21.763Z",
|
|
5
|
+
"instarVersion": "1.3.939",
|
|
6
6
|
"entryCount": 202,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -1530,7 +1530,7 @@
|
|
|
1530
1530
|
"type": "subsystem",
|
|
1531
1531
|
"domain": "server",
|
|
1532
1532
|
"sourcePath": "src/server/AgentServer.ts",
|
|
1533
|
-
"contentHash": "
|
|
1533
|
+
"contentHash": "212bac437dfd2ea5df615070a4956d6f3fbd892674913dbc9676aea8fd4a1ed6",
|
|
1534
1534
|
"since": "2025-01-01"
|
|
1535
1535
|
},
|
|
1536
1536
|
"subsystem:session-manager": {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
The Throughput server now calls GitHub GraphQL directly with an explicit
|
|
9
|
+
agent-owned token instead of starting a bare `gh` subprocess. The remaining
|
|
10
|
+
server-side CLI consumers share one absolute-executable, explicit-token runtime,
|
|
11
|
+
including the guarded Green-PR merge child.
|
|
12
|
+
|
|
13
|
+
## What to Tell Your User
|
|
14
|
+
|
|
15
|
+
The Throughput tab can load real chart data when the agent has a GitHub token in
|
|
16
|
+
its environment or vault, even when the server runs in the background with launchd's
|
|
17
|
+
restricted PATH. It will report authentication unavailable instead of silently
|
|
18
|
+
using another person's GitHub login.
|
|
19
|
+
|
|
20
|
+
## Summary of New Capabilities
|
|
21
|
+
|
|
22
|
+
- Uses direct authenticated GraphQL for Throughput.
|
|
23
|
+
- Fails closed on missing identity, incomplete Search pagination, or provider
|
|
24
|
+
result ceilings.
|
|
25
|
+
- Uses real Pacific timezone boundaries in both standard and daylight time.
|
|
26
|
+
- Gives CI polling and Green-PR reads/actuation one shared explicit GitHub runtime.
|
|
27
|
+
|
|
28
|
+
## Evidence
|
|
29
|
+
|
|
30
|
+
The focused runtime, route, pagination, timezone, CI, and Green-PR suites pass 73
|
|
31
|
+
tests. TypeScript and repository lint pass. Independent security, integration, and
|
|
32
|
+
throughput reviews were folded into the converged design. Final release evidence
|
|
33
|
+
also requires post-deployment desktop and phone verification with real chart data.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Side-Effects Review — Throughput GitHub runtime repair
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `throughput-github-runtime-repair`
|
|
4
|
+
**Date:** `2026-07-24`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `Aquinas (review_security_identity)`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
The Throughput route moves from a bare GitHub CLI subprocess to authenticated
|
|
11
|
+
GraphQL, while `src/core/githubRuntime.ts` becomes the shared explicit-token,
|
|
12
|
+
absolute-executable boundary for the CI poller and Green-PR watcher. The same
|
|
13
|
+
runtime environment is threaded through the real `safe-merge` child. Search
|
|
14
|
+
cardinality and Pacific timezone correctness are made explicit invariants.
|
|
15
|
+
|
|
16
|
+
## Decision-point inventory
|
|
17
|
+
|
|
18
|
+
- `buildThroughputSeries` identity resolution — **modify** — only environment or
|
|
19
|
+
agent-vault identity is accepted.
|
|
20
|
+
- Throughput Search pagination — **modify** — reported and fetched counts must agree
|
|
21
|
+
and remain at or below the provider ceiling.
|
|
22
|
+
- `resolveGhExecutable` — **add** — only known absolute, executable files qualify.
|
|
23
|
+
- `DefaultMergeRunner` process admission — **modify** — explicit GitHub runtime is
|
|
24
|
+
required before contract probing or actuation.
|
|
25
|
+
- `CiFailurePoller` GitHub read — **modify** — uses the shared cached runtime.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 1. Over-block
|
|
30
|
+
|
|
31
|
+
A legitimate install with a working machine-global `gh auth login` but no
|
|
32
|
+
`GITHUB_TOKEN` and no vault `github_token` is now refused. This is intentional:
|
|
33
|
+
the ambient login cannot prove agent identity. A 30-day window with more than 1,000
|
|
34
|
+
merged PRs is also refused rather than partially charted; a different data source
|
|
35
|
+
would be needed to support that volume honestly.
|
|
36
|
+
|
|
37
|
+
## 2. Under-block
|
|
38
|
+
|
|
39
|
+
An explicit token can still belong to the wrong GitHub principal if the operator
|
|
40
|
+
stores the wrong value. This layer proves explicit selection, not semantic
|
|
41
|
+
ownership. GitHub may also change its GraphQL schema or Search ceiling; those
|
|
42
|
+
changes fail the route closed through schema/count validation rather than render
|
|
43
|
+
incorrect data.
|
|
44
|
+
|
|
45
|
+
## 3. Level-of-abstraction fit
|
|
46
|
+
|
|
47
|
+
Identity and executable selection are centralized at the server process boundary,
|
|
48
|
+
below all three consumers. Throughput uses the higher-level GraphQL interface
|
|
49
|
+
because it needs structured read data, while the two legacy CLI consumers reuse the
|
|
50
|
+
lower-level runtime primitive. The existing `safe-merge` authority continues to own
|
|
51
|
+
merge judgment and execution; this change does not create a parallel merge gate.
|
|
52
|
+
|
|
53
|
+
## 4. Signal vs authority compliance
|
|
54
|
+
|
|
55
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
56
|
+
|
|
57
|
+
- [ ] No — this change produces a signal consumed by an existing smart gate.
|
|
58
|
+
- [ ] No — this change has no block/allow surface.
|
|
59
|
+
- [ ] Yes — but the logic is a smart gate with full conversational context (LLM-backed with recent history or equivalent).
|
|
60
|
+
- [x] Yes, with deterministic structural invariants — explicit identity,
|
|
61
|
+
executable-file status, and complete provider cardinality are enumerable safety
|
|
62
|
+
floors, not brittle proxies for intent.
|
|
63
|
+
|
|
64
|
+
The new refusals answer structural questions with exact evidence. They do not infer
|
|
65
|
+
user intent or choose among competing live signals. Green-PR judgment remains with
|
|
66
|
+
the existing eligibility ladder and `safe-merge`.
|
|
67
|
+
|
|
68
|
+
## 4b. Judgment-point check (Judgment Within Floors standard)
|
|
69
|
+
|
|
70
|
+
No new static heuristic is added at a competing-signals decision point. Token
|
|
71
|
+
presence, executable path shape, HTTP/schema validity, Search cardinality, and
|
|
72
|
+
timezone conversion are hard invariants with enumerable outcomes.
|
|
73
|
+
|
|
74
|
+
## 5. Interactions
|
|
75
|
+
|
|
76
|
+
- **Shadowing:** explicit-runtime admission runs before GitHub reads or merge
|
|
77
|
+
contract probing. It intentionally shadows ambient CLI identity; later safety
|
|
78
|
+
checks run unchanged once admission succeeds.
|
|
79
|
+
- **Double-fire:** no new scheduler or action is added. The Green-PR watcher and CI
|
|
80
|
+
poller retain their existing cadence and lease gates.
|
|
81
|
+
- **Races:** the five-minute cache is process-local. A token rotation can coexist
|
|
82
|
+
with the old value until the TTL expires; GitHub rejects a revoked value, and no
|
|
83
|
+
caller falls back to ambient auth.
|
|
84
|
+
- **Feedback loops:** Throughput is read-only. CI writes the existing failure ledger
|
|
85
|
+
and Green-PR retains the existing act path; this change adds no feedback edge.
|
|
86
|
+
|
|
87
|
+
## 6. External surfaces
|
|
88
|
+
|
|
89
|
+
GitHub receives direct GraphQL requests from Throughput with an explicit bearer
|
|
90
|
+
identity. The route's unauthenticated failure is now specifically
|
|
91
|
+
`github-auth-unavailable`; other failures retain the generic unavailable response.
|
|
92
|
+
No secret value is logged or returned. There is no new database, file format, URL,
|
|
93
|
+
notification, or operator action. Existing installs must supply `GITHUB_TOKEN` or
|
|
94
|
+
the vault secret for live data.
|
|
95
|
+
|
|
96
|
+
## 6b. Operator-surface quality (Operator-Surface Quality standard)
|
|
97
|
+
|
|
98
|
+
No dashboard renderer, form, or operator action is changed. The existing Throughput
|
|
99
|
+
tab is verified separately after deployment at desktop and phone widths.
|
|
100
|
+
|
|
101
|
+
## 7. Multi-machine posture (Cross-Machine Coherence)
|
|
102
|
+
|
|
103
|
+
**Machine-local BY DESIGN:** executable location and server environment are
|
|
104
|
+
machine-specific security truths. Each fleet server independently requires its
|
|
105
|
+
agent-scoped explicit identity and resolves its own executable. The output contract
|
|
106
|
+
is identical across machines; a misconfigured peer fails closed rather than
|
|
107
|
+
borrowing that host's global GitHub seat. No user-facing notices are emitted, no new
|
|
108
|
+
durable state can strand during topic transfer, and no URLs are generated.
|
|
109
|
+
|
|
110
|
+
## 8. Rollback cost
|
|
111
|
+
|
|
112
|
+
Pure code rollback: revert and ship a patch. No migration, state cleanup, or agent
|
|
113
|
+
reset is required. The rollback window restores the known Throughput 503 and ambient
|
|
114
|
+
CLI-identity hazard on affected machines, but does not corrupt data.
|
|
115
|
+
|
|
116
|
+
## Conclusion
|
|
117
|
+
|
|
118
|
+
The first review found that fixing only Throughput left the actual `safe-merge`
|
|
119
|
+
child outside the identity boundary. It also found Search truncation, repeated vault
|
|
120
|
+
resolution, relative-PATH acceptance, and fixed-offset day bucketing. All were
|
|
121
|
+
folded into this change with behavioral tests. The design is clear to ship subject
|
|
122
|
+
to the independent second-pass reread and green ceremony.
|
|
123
|
+
|
|
124
|
+
## Second-pass review (if required)
|
|
125
|
+
|
|
126
|
+
**Reviewer:** Aquinas (`review_security_identity`)
|
|
127
|
+
**Independent read of the artifact: concur**
|
|
128
|
+
|
|
129
|
+
Concur with the review: the shared runtime closes the prior identity and PATH
|
|
130
|
+
gaps through the real `safe-merge` act path, all three consumers fail safely, and
|
|
131
|
+
the cadence, lease, rollback, multi-machine, and self-action conclusions match the
|
|
132
|
+
final code and behavioral tests.
|
|
133
|
+
|
|
134
|
+
## Evidence pointers
|
|
135
|
+
|
|
136
|
+
- `tests/unit/github-runtime.test.ts`
|
|
137
|
+
- `tests/integration/throughput-github-auth.test.ts`
|
|
138
|
+
- `tests/unit/throughput-routes.test.ts`
|
|
139
|
+
- `tests/unit/green-pr-automerge-wiring.test.ts`
|
|
140
|
+
- `tests/unit/merge-runner.test.ts`
|
|
141
|
+
- `tests/unit/CiFailurePoller.test.ts`
|
|
142
|
+
|
|
143
|
+
## Class-Closure Declaration (display-only mirror)
|
|
144
|
+
|
|
145
|
+
`defectClass: unbounded-self-action`, `closure: guard`,
|
|
146
|
+
`guardEvidence: { enforcementType: ratchet, citation:
|
|
147
|
+
tests/unit/self-action-convergence.test.ts, howCaught: the touched CI and Green-PR
|
|
148
|
+
controllers retain lease/cadence admission and no new trigger edge; missing identity
|
|
149
|
+
settles each tick to a bounded no-action refusal, while the existing convergence
|
|
150
|
+
ratchet detects a controller whose steady-state action can grow without a settling
|
|
151
|
+
brake }`.
|
|
152
|
+
|
|
153
|
+
The production incident is an ordinary runtime identity defect, not an
|
|
154
|
+
agent-authored prompt/config/skill defect. The declaration is present because this
|
|
155
|
+
repair modifies existing self-triggered controllers.
|