@pome-sh/cli 0.16.0 → 0.18.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 +13 -5
- package/dist/build-info.json +3 -3
- package/dist/src/cli/checks-add.d.ts +2 -7
- package/dist/src/cli/checks-add.js +10 -24
- package/dist/src/cli/eval.js +12 -10
- package/dist/src/cli/main.js +1 -1
- package/dist/src/cli/vocabulary-skew.d.ts +64 -0
- package/dist/src/cli/vocabulary-skew.js +187 -0
- package/dist/src/hosted/evalResultView.d.ts +1 -1
- package/dist/src/hosted/evalResultView.js +22 -5
- package/dist/src/runner/groupRender.d.ts +12 -2
- package/dist/src/runner/groupRender.js +32 -8
- package/dist/src/runner/runTaskHosted.d.ts +8 -1
- package/dist/src/runner/runTaskHosted.js +11 -1
- package/dist/src/runner/runTrialGroup.js +15 -2
- package/dist/src/twin/githubCloneAdapter.d.ts +1 -0
- package/node_modules/@pome-sh/twin-github/FIDELITY.md +14 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-pulls.d.ts +4 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-pulls.js +93 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-pulls.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/check-state.d.ts +1 -0
- package/node_modules/@pome-sh/twin-github/dist/src/check-state.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/checks.d.ts +3 -0
- package/node_modules/@pome-sh/twin-github/dist/src/checks.js +2 -1
- package/node_modules/@pome-sh/twin-github/dist/src/checks.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/db.js +46 -4
- package/node_modules/@pome-sh/twin-github/dist/src/db.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/domain/github-domain.d.ts +3 -0
- package/node_modules/@pome-sh/twin-github/dist/src/domain/github-domain.js +49 -1
- package/node_modules/@pome-sh/twin-github/dist/src/domain/github-domain.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/domain/issues.js +15 -5
- package/node_modules/@pome-sh/twin-github/dist/src/domain/issues.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/serializers.d.ts +1 -1
- package/node_modules/@pome-sh/twin-github/dist/src/serializers.js +8 -2
- package/node_modules/@pome-sh/twin-github/dist/src/serializers.js.map +1 -1
- package/node_modules/@pome-sh/twin-github/package.json +1 -1
- package/node_modules/@pome-sh/twin-linear/CHANGELOG.md +101 -0
- package/node_modules/@pome-sh/twin-linear/dist/src/db.d.ts +6 -0
- package/node_modules/@pome-sh/twin-linear/dist/src/db.js +53 -4
- package/node_modules/@pome-sh/twin-linear/dist/src/db.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/agents.d.ts +16 -13
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/agents.js +16 -12
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/agents.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/comments.js +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/comments.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/documents.js +8 -8
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/documents.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/issues.js +20 -17
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/issues.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/labels.js +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/labels.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/linear-domain.d.ts +4 -17
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/linear-domain.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/normalize.d.ts +12 -2
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/normalize.js +28 -5
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/normalize.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/projects-cycles.js +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/projects-cycles.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/rows.d.ts +3 -3
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/rows.js +4 -3
- package/node_modules/@pome-sh/twin-linear/dist/src/domain/rows.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/graphql/formatters.js +3 -3
- package/node_modules/@pome-sh/twin-linear/dist/src/graphql/formatters.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/graphql/mutation-inputs.d.ts +30 -12
- package/node_modules/@pome-sh/twin-linear/dist/src/graphql/mutation-inputs.js +33 -28
- package/node_modules/@pome-sh/twin-linear/dist/src/graphql/mutation-inputs.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/graphql/resolvers.js +2 -2
- package/node_modules/@pome-sh/twin-linear/dist/src/graphql/resolvers.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/graphql/schema.js +31 -13
- package/node_modules/@pome-sh/twin-linear/dist/src/graphql/schema.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/state.js +4 -4
- package/node_modules/@pome-sh/twin-linear/dist/src/state.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/dist/src/types.d.ts +10 -4
- package/node_modules/@pome-sh/twin-linear/dist/src/types.js.map +1 -1
- package/node_modules/@pome-sh/twin-linear/fixtures/README.md +1 -0
- package/node_modules/@pome-sh/twin-linear/fixtures/linear-introspection.json +66 -0
- package/node_modules/@pome-sh/twin-linear/package.json +2 -1
- package/node_modules/@pome-sh/twin-stripe/FIDELITY.md +8 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/idempotency.d.ts +23 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/idempotency.js +40 -6
- package/node_modules/@pome-sh/twin-stripe/dist/src/idempotency.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js +5 -0
- package/node_modules/@pome-sh/twin-stripe/dist/src/routes/_helpers.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/twin.js +7 -1
- package/node_modules/@pome-sh/twin-stripe/dist/src/twin.js.map +1 -1
- package/node_modules/@pome-sh/twin-stripe/package.json +1 -1
- package/package.json +4 -4
- package/tasks/14-stripe-refund-retry.md +17 -14
|
@@ -179,7 +179,14 @@ export async function runTrialGroup(options) {
|
|
|
179
179
|
row = {
|
|
180
180
|
kind: "completed",
|
|
181
181
|
score: result.score.satisfaction,
|
|
182
|
-
|
|
182
|
+
// F-925 — the trial's own verdict, carried out of the run rather than
|
|
183
|
+
// re-derived here. It was `result.exitCode === 0`, which cannot express
|
|
184
|
+
// the third state (1 means both "failed" and "could not be graded"), so
|
|
185
|
+
// a 100/100 trial with 3 of 4 criteria skipped counted as a clean pass.
|
|
186
|
+
// Reusing the run's own value rather than calling `scoreStatus` again
|
|
187
|
+
// on the same inputs is what keeps the trial line and the single-run
|
|
188
|
+
// headline from ever disagreeing.
|
|
189
|
+
verdict: result.verdict,
|
|
183
190
|
seconds: result.durationMs / 1000,
|
|
184
191
|
note: failing.length > 0
|
|
185
192
|
? failing.map((r) => criterionPhrase(r.criterion.text)).join(" · ")
|
|
@@ -235,7 +242,13 @@ export async function runTrialGroup(options) {
|
|
|
235
242
|
// 4. FDRS-644 — the fix & green handoff, only when a COMPLETED trial
|
|
236
243
|
// failed. Errored trials are sandbox noise: the answer there is re-run,
|
|
237
244
|
// not a code fix, so an errored-only group gets no handoff.
|
|
238
|
-
|
|
245
|
+
//
|
|
246
|
+
// F-925 — `fail`, NOT "anything that isn't a pass". This was `!r.passed`,
|
|
247
|
+
// which now includes the incomplete trial, and pointing someone at
|
|
248
|
+
// `pome fix-prompt` for a criterion that never ran tells them to fix an agent
|
|
249
|
+
// that may be blameless. An abstention is a grader gap; the handoff is for
|
|
250
|
+
// agent defects.
|
|
251
|
+
const failedCompleted = rows.filter((r) => r.kind === "completed" && r.verdict === "fail").length;
|
|
239
252
|
if (failedCompleted > 0) {
|
|
240
253
|
const artifactsDir = options.artifactsDir ?? "runs";
|
|
241
254
|
const fixPromptCommand = artifactsDir === "runs"
|
|
@@ -287,6 +287,20 @@ upstream so a divergence that upstream "heals" becomes a tier-upgrade signal.
|
|
|
287
287
|
out of scope, but the array-aware oracle (FDRS-455) now SEES the item-count
|
|
288
288
|
divergence: registered as accepted on the collection root so this L1 read surface is
|
|
289
289
|
INFO, not drift, and flagged as a genuine twin-fidelity gap for follow-up.
|
|
290
|
+
|
|
291
|
+
**Narrowed by F-1151: the COMMENT routes now honour the rule.**
|
|
292
|
+
`GET|POST /repos/:o/:r/issues/:number/comments` accept a pull-request number, which is
|
|
293
|
+
how real GitHub documents commenting on a PR's conversation. Until F-1151 they did
|
|
294
|
+
not — `issue_comments` carried a foreign key to `issues(repo_id, number)` and a PR has
|
|
295
|
+
no row there, so every PR comment failed the constraint and the route answered
|
|
296
|
+
`404 Issue not found`. That was this bullet's write-side face, and it was recorded
|
|
297
|
+
nowhere: the matrix listed the route as `hot`/`semantic` with no caveat, and the only
|
|
298
|
+
comment tool the bundled `pr-summary-*` examples expose 404'd on every run. What
|
|
299
|
+
remains open is the READ half above — the `/issues` COLLECTION still lists issues
|
|
300
|
+
only, and PRs still carry no `pull_request` member — so the divergence stands and
|
|
301
|
+
keeps its registry entry. The number space was never the obstacle: `nextNumber()`
|
|
302
|
+
already draws issue and PR numbers from one per-repo counter, so a number names one
|
|
303
|
+
entity or the other, never both.
|
|
290
304
|
17. **Issue `assignees`/`labels` arrays reflect the controlled-sandbox seed, not real GitHub.**
|
|
291
305
|
The plural `assignees` and the `labels` arrays are non-empty on the twin (its seeded
|
|
292
306
|
fictional assignee/label) but empty on real GitHub for the seeded sandbox — the same
|
|
@@ -4,6 +4,10 @@ export declare const pullRequestStateCheck: Check<{
|
|
|
4
4
|
repo: string;
|
|
5
5
|
state: string;
|
|
6
6
|
}>;
|
|
7
|
+
export declare const pullRequestCommentExists: Check<{
|
|
8
|
+
pr: string;
|
|
9
|
+
repo: string;
|
|
10
|
+
}>;
|
|
7
11
|
export declare const pullRequestReviewExists: Check<{
|
|
8
12
|
review: string;
|
|
9
13
|
pr: string;
|
|
@@ -80,6 +80,99 @@ export const pullRequestStateCheck = defineCheck({
|
|
|
80
80
|
};
|
|
81
81
|
},
|
|
82
82
|
});
|
|
83
|
+
// F-1151 — the fourteenth declaration, and the one whose whole difficulty was
|
|
84
|
+
// deciding WHICH question it answers.
|
|
85
|
+
//
|
|
86
|
+
// Three things on a pull request can be called "a comment", the twin exports all
|
|
87
|
+
// three separately, and F-1075 declined to bind this sentence rather than guess
|
|
88
|
+
// between them:
|
|
89
|
+
//
|
|
90
|
+
// 1. a CONVERSATION comment — `pull_requests[].comments[]` ← this check
|
|
91
|
+
// 2. a REVIEW BODY — `pull_requests[].reviews[].body`
|
|
92
|
+
// 3. an INLINE REVIEW COMMENT — `pull_requests[].review_comments[]`
|
|
93
|
+
//
|
|
94
|
+
// Reading 1, for three reasons that agree. It is what GitHub itself means by a
|
|
95
|
+
// comment on a pull request: its API routes these through the Issue Comments
|
|
96
|
+
// endpoints and names the other two "review comments" and "a review". It is what
|
|
97
|
+
// a summarising agent produces — the `pr-summary-*` tasks that ship these six
|
|
98
|
+
// criteria post a summary to the conversation, they do not open a review to carry
|
|
99
|
+
// it. And it is the only reading whose sentence needs no qualifier: the other two
|
|
100
|
+
// have to say "review" out loud to be true, so they belong in templates that do.
|
|
101
|
+
//
|
|
102
|
+
// The other two are NOT covered here and are not silently folded in. Reading 2
|
|
103
|
+
// already has a neighbour — `github.pr-review-exists` with `COMMENTED` asserts a
|
|
104
|
+
// review exists, and a body check would be a strictly narrower sibling of it.
|
|
105
|
+
// Reading 3 has no declaration at all yet; when something asserts it, it gets its
|
|
106
|
+
// own sentence naming the file it is anchored to.
|
|
107
|
+
//
|
|
108
|
+
// The sentence is deliberately UNCHANGED from the six criteria already written
|
|
109
|
+
// in `examples/pr-summary-agent` and `examples/pr-summary-review`. It could have
|
|
110
|
+
// been re-rendered to say "conversation comment" and remove all doubt from the
|
|
111
|
+
// sentence itself, and that was weighed: the words "a comment on pull request #1" are
|
|
112
|
+
// GitHub's own for this surface, so a template that says them is accurate, and
|
|
113
|
+
// keeping it byte-identical means the corpus binds without six file edits and
|
|
114
|
+
// without moving `CORPUS_SHAPE_BASELINE`. What carries the disambiguation is the
|
|
115
|
+
// `description`, which is what an author reads before picking.
|
|
116
|
+
export const pullRequestCommentExists = defineCheck({
|
|
117
|
+
id: "github.pr-comment-exists",
|
|
118
|
+
description: "Asserts the pull request's CONVERSATION timeline carries at least one comment — the " +
|
|
119
|
+
"surface GitHub's issue-comment endpoints write to. It is not the other two things a " +
|
|
120
|
+
"reader may call a comment on a PR: a review's body is not one (assert that with " +
|
|
121
|
+
"`github.pr-review-exists`), and an inline review comment anchored to a file and line is " +
|
|
122
|
+
"not one either. It says nothing about who commented, how many did, or what any of them " +
|
|
123
|
+
"say — and no declaration reads the TEXT of a pull request's comment yet. " +
|
|
124
|
+
"`github.issue-comment-contains` is the issue-side counterpart and does NOT reach a pull " +
|
|
125
|
+
"request: it resolves its subject among the repository's issues, so pointing it at a PR " +
|
|
126
|
+
"number fails as `issue #N not found`. A pull request whose export carries no comments " +
|
|
127
|
+
"section at all is SKIPPED, because absent is not the same as none.",
|
|
128
|
+
template: "Pull request #{pr} in `{repo}` has at least one comment",
|
|
129
|
+
params: { pr: prNumber, repo: repoRef },
|
|
130
|
+
substrate: "final",
|
|
131
|
+
polarity: () => "positive",
|
|
132
|
+
// A count, not a literal hunted inside prose: no redaction rule can destroy
|
|
133
|
+
// the thing this check compares, so there is no subject to declare.
|
|
134
|
+
subject: () => null,
|
|
135
|
+
// No falsifiable trigger. The PR number only RESOLVES — mutating it
|
|
136
|
+
// early-returns "not found", which moves the verdict on every seed for a reason
|
|
137
|
+
// that never reaches the comment count — and there is no second slot to
|
|
138
|
+
// falsify. Same shape as `pr-review-exists`, and admitted as `no_trigger`
|
|
139
|
+
// rather than buying a false clean bill.
|
|
140
|
+
vacuityMutant: () => null,
|
|
141
|
+
// The failing world names `comments: []`, NOT an absent section: absent SKIPS,
|
|
142
|
+
// because absent is not none — and a skip satisfies no arm.
|
|
143
|
+
discriminatingWorlds: ({ pr }) => ({
|
|
144
|
+
passing: finalWorld(repoState({
|
|
145
|
+
pull_requests: [{ number: Number(pr), comments: [{ body: "Summary: adds an optional discount." }] }],
|
|
146
|
+
})),
|
|
147
|
+
failing: finalWorld(repoState({ pull_requests: [{ number: Number(pr), comments: [] }] })),
|
|
148
|
+
}),
|
|
149
|
+
evaluate({ pr, repo }, { final }) {
|
|
150
|
+
const found = resolvePullRequest(final, repo, pr);
|
|
151
|
+
if ("missing" in found)
|
|
152
|
+
return { passed: false, reason: found.missing };
|
|
153
|
+
// Comments section absent — a snapshot predating PR-comment export. We
|
|
154
|
+
// cannot tell "nobody commented" from "not captured", so safe-skip rather
|
|
155
|
+
// than failing an agent that did comment. An empty array is a real zero and
|
|
156
|
+
// falls through to failed.
|
|
157
|
+
if (found.found.comments == null) {
|
|
158
|
+
return {
|
|
159
|
+
passed: false,
|
|
160
|
+
status: "skipped",
|
|
161
|
+
reason: `pull request #${pr} has no comments section in state_final (state_incomplete)`,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const count = found.found.comments.length;
|
|
165
|
+
return {
|
|
166
|
+
passed: count > 0,
|
|
167
|
+
// Names the surface, so a failure cannot be misread as "the agent left a
|
|
168
|
+
// review body and this check refused to see it" — which is exactly the
|
|
169
|
+
// wrong-match complaint the three readings invite.
|
|
170
|
+
reason: count > 0
|
|
171
|
+
? `pull request #${pr} has ${count} conversation comment(s)`
|
|
172
|
+
: `pull request #${pr} has no conversation comments (reviews and inline review comments are not counted)`,
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
});
|
|
83
176
|
export const pullRequestReviewExists = defineCheck({
|
|
84
177
|
id: "github.pr-review-exists",
|
|
85
178
|
description: "Asserts at least one submitted review on the pull request carries this state. It does " +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-pulls.js","sourceRoot":"","sources":["../../src/check-pulls.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,0EAA0E;AAC1E,EAAE;AACF,+EAA+E;AAC/E,wEAAwE;AAExE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG1D,MAAM,CAAC,MAAM,qBAAqB,GAAuD,WAAW,CAAC;IACnG,EAAE,EAAE,iBAAiB;IACrB,WAAW,EACT,2FAA2F;QAC3F,uFAAuF;QACvF,0FAA0F;QAC1F,yFAAyF;QACzF,yDAAyD;IAC3D,QAAQ,EAAE,2CAA2C;IACrD,MAAM,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE;IAChE,SAAS,EAAE,OAAO;IAClB,0EAA0E;IAC1E,yEAAyE;IACzE,uDAAuD;IACvD,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC;IAC/F,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI;IACnB,0EAA0E;IAC1E,+DAA+D;IAC/D,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI;IACzB,0EAA0E;IAC1E,yEAAyE;IACzE,yBAAyB;IACzB,oBAAoB,EAAE,CAAC,EAAE,EAAE,EAAE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O,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;KACzF,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE;QACtC,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAClD,IAAI,SAAS,IAAI,KAAK;YAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;QACxE,2EAA2E;QAC3E,sEAAsE;QACtE,0EAA0E;QAC1E,4CAA4C;QAC5C,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;YAChC,OAAO;gBACL,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE,iBAAiB,EAAE,2DAA2D;aACvF,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO;YACL,MAAM;YACN,MAAM,EAAE,MAAM;gBACZ,CAAC,CAAC,iBAAiB,EAAE,UAAU,MAAM,SAAS;gBAC9C,CAAC,CAAC,iBAAiB,EAAE,iBAAiB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,MAAM,SAAS;SACzF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -19,6 +19,7 @@ export interface GitHubCheckStatePullRequest {
|
|
|
19
19
|
state?: string | null;
|
|
20
20
|
merged?: number | boolean | null;
|
|
21
21
|
reviews?: GitHubCheckStateReview[] | null;
|
|
22
|
+
comments?: GitHubCheckStateComment[] | null;
|
|
22
23
|
}
|
|
23
24
|
export interface GitHubCheckStateCommitStatus {
|
|
24
25
|
context?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-state.js","sourceRoot":"","sources":["../../src/check-state.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,gEAAgE;AAChE,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,sDAAsD;AACtD,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,8EAA8E;AAC9E,yEAAyE;AACzE,EAAE;AACF,gFAAgF;AAChF,4CAA4C;AAC5C,gFAAgF;AAChF,6EAA6E;AAC7E,6EAA6E;AAC7E,sEAAsE;AACtE,yEAAyE;AACzE,4EAA4E;AAC5E,qCAAqC;
|
|
1
|
+
{"version":3,"file":"check-state.js","sourceRoot":"","sources":["../../src/check-state.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,gEAAgE;AAChE,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,sDAAsD;AACtD,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,8EAA8E;AAC9E,yEAAyE;AACzE,EAAE;AACF,gFAAgF;AAChF,4CAA4C;AAC5C,gFAAgF;AAChF,6EAA6E;AAC7E,6EAA6E;AAC7E,sEAAsE;AACtE,yEAAyE;AACzE,4EAA4E;AAC5E,qCAAqC;AAoFrC,yEAAyE;AACzE,yEAAyE;AACzE,4EAA4E;AAC5E,mEAAmE;AACnE,MAAM,UAAU,QAAQ,CAAC,KAAuB,EAAE,GAAW;IAC3D,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,YAAY,IAAI,EAAE,EAAE,CAAC;QAC5C,IAAI,IAAI,CAAC,SAAS,KAAK,GAAG;YAAE,OAAO,IAAI,CAAC;QACxC,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,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,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -29,6 +29,9 @@ export declare const GITHUB_CHECKS: readonly [import("./check-kind.js").Check<{
|
|
|
29
29
|
pr: string;
|
|
30
30
|
repo: string;
|
|
31
31
|
state: string;
|
|
32
|
+
}>, import("./check-kind.js").Check<{
|
|
33
|
+
pr: string;
|
|
34
|
+
repo: string;
|
|
32
35
|
}>, import("./check-kind.js").Check<{
|
|
33
36
|
review: string;
|
|
34
37
|
pr: string;
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
//
|
|
46
46
|
// So github now has no hand-written predicate left anywhere.
|
|
47
47
|
import { issueAssignee, issueCommentContains, issueExactlyOneLabel, issueExists, issueHasLabel, issueStateCheck, } from "./check-issues.js";
|
|
48
|
-
import { pullRequestReviewExists, pullRequestStateCheck } from "./check-pulls.js";
|
|
48
|
+
import { pullRequestCommentExists, pullRequestReviewExists, pullRequestStateCheck, } from "./check-pulls.js";
|
|
49
49
|
import { commitStatus, fileExists, noNewLabels } from "./check-repos.js";
|
|
50
50
|
import { noUnsupportedEndpoint, toolNeverCalled } from "./check-tape.js";
|
|
51
51
|
// Order is not first-match-wins here — the generated patterns are anchored and
|
|
@@ -62,6 +62,7 @@ export const GITHUB_CHECKS = [
|
|
|
62
62
|
issueCommentContains,
|
|
63
63
|
noNewLabels,
|
|
64
64
|
pullRequestStateCheck,
|
|
65
|
+
pullRequestCommentExists,
|
|
65
66
|
pullRequestReviewExists,
|
|
66
67
|
fileExists,
|
|
67
68
|
commitStatus,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checks.js","sourceRoot":"","sources":["../../src/checks.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,6EAA6E;AAC7E,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,uEAAuE;AACvE,4EAA4E;AAC5E,mBAAmB;AACnB,EAAE;AACF,4EAA4E;AAC5E,kEAAkE;AAClE,+EAA+E;AAC/E,4CAA4C;A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+E;AAC/E,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,6EAA6E;AAC7E,EAAE;AACF,6DAA6D;AAE7D,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAezE,+EAA+E;AAC/E,0EAA0E;AAC1E,gFAAgF;AAChF,uEAAuE;AACvE,0BAA0B;AAC1B,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,WAAW;IACX,eAAe;IACf,aAAa;IACb,oBAAoB;IACpB,aAAa;IACb,oBAAoB;IACpB,WAAW;IACX,qBAAqB;IACrB,wBAAwB;IACxB,uBAAuB;IACvB,UAAU;IACV,YAAY;IACZ,4EAA4E;IAC5E,+EAA+E;IAC/E,kEAAkE;IAClE,qBAAqB;IACrB,eAAe;CACP,CAAC"}
|
|
@@ -179,6 +179,8 @@ CREATE TABLE IF NOT EXISTS issue_labels (
|
|
|
179
179
|
FOREIGN KEY (repo_id, label_name) REFERENCES labels(repo_id, name) ON DELETE CASCADE
|
|
180
180
|
);
|
|
181
181
|
|
|
182
|
+
-- issue_number names an issue OR a pull request, so no FK to issues — see
|
|
183
|
+
-- ensureCommentsAllowPullRequests below (F-1151).
|
|
182
184
|
CREATE TABLE IF NOT EXISTS issue_comments (
|
|
183
185
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
184
186
|
repo_id INTEGER NOT NULL,
|
|
@@ -187,7 +189,7 @@ CREATE TABLE IF NOT EXISTS issue_comments (
|
|
|
187
189
|
user_login TEXT NOT NULL,
|
|
188
190
|
created_at TEXT NOT NULL,
|
|
189
191
|
updated_at TEXT NOT NULL,
|
|
190
|
-
FOREIGN KEY (repo_id
|
|
192
|
+
FOREIGN KEY (repo_id) REFERENCES repositories(id) ON DELETE CASCADE
|
|
191
193
|
);
|
|
192
194
|
|
|
193
195
|
CREATE TABLE IF NOT EXISTS pull_requests (
|
|
@@ -320,6 +322,7 @@ export function migrate(db) {
|
|
|
320
322
|
ensureColumn(db, "pull_request_review_comments", "in_reply_to_id", "INTEGER");
|
|
321
323
|
ensureColumn(db, "collaborators", "invitation_state", "TEXT NOT NULL DEFAULT 'accepted'");
|
|
322
324
|
ensureIssueNumberCascade(db);
|
|
325
|
+
ensureCommentsAllowPullRequests(db);
|
|
323
326
|
hydrateDerivedColumns(db);
|
|
324
327
|
}
|
|
325
328
|
export function resetDatabase(db) {
|
|
@@ -332,7 +335,11 @@ function ensureColumn(db, table, column, definition) {
|
|
|
332
335
|
}
|
|
333
336
|
}
|
|
334
337
|
function ensureIssueNumberCascade(db) {
|
|
335
|
-
|
|
338
|
+
// `issue_comments` used to be rebuilt here too. It is not any more: F-1151
|
|
339
|
+
// removed its `issues` FK outright, so it has no cascade to fix, and leaving
|
|
340
|
+
// it in this list would have this function put the constraint back on every
|
|
341
|
+
// boot of an older database. `ensureCommentsAllowPullRequests` owns it now.
|
|
342
|
+
const tables = ["issue_assignees", "issue_labels"];
|
|
336
343
|
const needsRebuild = tables.some((table) => {
|
|
337
344
|
const foreignKeys = db.prepare(`PRAGMA foreign_key_list(${table})`).all();
|
|
338
345
|
return foreignKeys.some((key) => key.table === "issues" && key.on_update !== "CASCADE");
|
|
@@ -365,7 +372,42 @@ CREATE TABLE issue_labels (
|
|
|
365
372
|
INSERT INTO issue_labels (repo_id, issue_number, label_name)
|
|
366
373
|
SELECT repo_id, issue_number, label_name FROM issue_labels_old;
|
|
367
374
|
DROP TABLE issue_labels_old;
|
|
368
|
-
|
|
375
|
+
`);
|
|
376
|
+
db.pragma("foreign_keys = ON");
|
|
377
|
+
}
|
|
378
|
+
// F-1151 — a comment may hang off a PULL REQUEST, not only an issue.
|
|
379
|
+
//
|
|
380
|
+
// Real GitHub models every pull request as an issue and documents the Issue
|
|
381
|
+
// Comments endpoints as the way to comment on a PR's conversation. The twin's
|
|
382
|
+
// `add_issue_comment` therefore has to accept a PR number, and until this
|
|
383
|
+
// migration it could not: `issue_comments` carried an FK to `issues(repo_id,
|
|
384
|
+
// number)`, and a PR has no row there (`createPullRequest` writes no companion
|
|
385
|
+
// issue — that is divergence #16 in FIDELITY.md, whose read side is still open).
|
|
386
|
+
// So the insert failed the constraint before any predicate could read it, and
|
|
387
|
+
// the only comment tool the bundled `pr-summary-*` examples expose 404'd on
|
|
388
|
+
// every run.
|
|
389
|
+
//
|
|
390
|
+
// The pair stays unambiguous without the constraint because `nextNumber()` hands
|
|
391
|
+
// issues and pull requests numbers out of ONE per-repo `entity_counter`: within
|
|
392
|
+
// a repo a number names an issue or a PR, never both.
|
|
393
|
+
//
|
|
394
|
+
// What the FK was also buying, and where each half went:
|
|
395
|
+
// - ON DELETE CASCADE from `repositories` — replaced by a direct repo FK, so
|
|
396
|
+
// dropping a repository still takes its comments.
|
|
397
|
+
// - ON UPDATE CASCADE on issue renumbering — dropped. The seed path already
|
|
398
|
+
// renumbers `issue_comments` itself (`domain/github-domain.ts`), belt-and-
|
|
399
|
+
// braces with the cascade that is now the only belt.
|
|
400
|
+
//
|
|
401
|
+
// One table rather than a second `pull_request_comments`, because
|
|
402
|
+
// `PATCH|DELETE /repos/:o/:r/issues/comments/:comment_id` addresses a comment by
|
|
403
|
+
// id alone. Two AUTOINCREMENT tables behind one route is two id spaces behind
|
|
404
|
+
// one address — a wrong-target write waiting for the first collision.
|
|
405
|
+
function ensureCommentsAllowPullRequests(db) {
|
|
406
|
+
const foreignKeys = db.prepare("PRAGMA foreign_key_list(issue_comments)").all();
|
|
407
|
+
if (!foreignKeys.some((key) => key.table === "issues"))
|
|
408
|
+
return;
|
|
409
|
+
db.pragma("foreign_keys = OFF");
|
|
410
|
+
db.exec(`
|
|
369
411
|
ALTER TABLE issue_comments RENAME TO issue_comments_old;
|
|
370
412
|
CREATE TABLE issue_comments (
|
|
371
413
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -375,7 +417,7 @@ CREATE TABLE issue_comments (
|
|
|
375
417
|
user_login TEXT NOT NULL,
|
|
376
418
|
created_at TEXT NOT NULL,
|
|
377
419
|
updated_at TEXT NOT NULL,
|
|
378
|
-
FOREIGN KEY (repo_id
|
|
420
|
+
FOREIGN KEY (repo_id) REFERENCES repositories(id) ON DELETE CASCADE
|
|
379
421
|
);
|
|
380
422
|
INSERT INTO issue_comments (id, repo_id, issue_number, body, user_login, created_at, updated_at)
|
|
381
423
|
SELECT id, repo_id, issue_number, body, user_login, created_at, updated_at FROM issue_comments_old;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","sources":["../../src/db.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,4EAA4E;AAC5E,wEAAwE;AACxE,yCAAyC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,aAAa,GAAG
|
|
1
|
+
{"version":3,"file":"db.js","sourceRoot":"","sources":["../../src/db.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,4EAA4E;AAC5E,wEAAwE;AACxE,yCAAyC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAC"}
|
|
@@ -40,6 +40,7 @@ export declare class GitHubDomain {
|
|
|
40
40
|
created_at: string;
|
|
41
41
|
updated_at: string;
|
|
42
42
|
}[];
|
|
43
|
+
comments: IssueCommentRow[];
|
|
43
44
|
repo_id: number;
|
|
44
45
|
number: number;
|
|
45
46
|
title: string;
|
|
@@ -3080,6 +3081,8 @@ export declare class GitHubDomain {
|
|
|
3080
3081
|
listLabels(repoId: number): LabelRow[];
|
|
3081
3082
|
listIssuesRows(repoId: number): IssueRow[];
|
|
3082
3083
|
requireIssue(repoId: number, number: number): IssueRow;
|
|
3084
|
+
commentTargetKind(repoId: number, number: number): "issue" | "pull_request" | null;
|
|
3085
|
+
requireCommentTarget(repoId: number, number: number): "issue" | "pull_request";
|
|
3083
3086
|
listIssueLabels(repoId: number, issueNumber: number): LabelRow[];
|
|
3084
3087
|
listIssueAssignees(repoId: number, issueNumber: number): string[];
|
|
3085
3088
|
issueCommentCount(repoId: number, issueNumber: number): number;
|
|
@@ -146,7 +146,18 @@ export class GitHubDomain {
|
|
|
146
146
|
...pull,
|
|
147
147
|
files: this.listPullRequestFileRows(repo.id, pull.number),
|
|
148
148
|
reviews: this.listPullRequestReviewRows(repo.id, pull.number),
|
|
149
|
-
review_comments: this.listPullRequestReviewCommentRows(repo.id, pull.number)
|
|
149
|
+
review_comments: this.listPullRequestReviewCommentRows(repo.id, pull.number),
|
|
150
|
+
// F-1151. THREE distinct comment surfaces reach a pull request and this
|
|
151
|
+
// is the third, so the export keeps them apart rather than merging them
|
|
152
|
+
// into one count a predicate could not attribute:
|
|
153
|
+
// `reviews[].body` — the prose attached to a review verdict
|
|
154
|
+
// `review_comments[]` — inline comments anchored to a file and line
|
|
155
|
+
// `comments[]` — the conversation timeline, THIS one
|
|
156
|
+
// Read from `issue_comments` because that is where GitHub puts them:
|
|
157
|
+
// conversation comments on a PR go through the issue-comment endpoints,
|
|
158
|
+
// and the number space is shared, so a PR's number selects its own rows
|
|
159
|
+
// and no issue's.
|
|
160
|
+
comments: this.listIssueCommentRows(repo.id, pull.number)
|
|
150
161
|
})),
|
|
151
162
|
commit_statuses: this.db.prepare("SELECT * FROM commit_statuses WHERE repo_id = ? ORDER BY id ASC").all(repo.id),
|
|
152
163
|
check_runs: this.db.prepare("SELECT * FROM check_runs WHERE repo_id = ? ORDER BY id ASC").all(repo.id)
|
|
@@ -745,6 +756,43 @@ export class GitHubDomain {
|
|
|
745
756
|
requireIssue(repoId, number) {
|
|
746
757
|
return this.db.prepare("SELECT * FROM issues WHERE repo_id = ? AND number = ?").get(repoId, number) ?? notFound("Issue not found");
|
|
747
758
|
}
|
|
759
|
+
// F-1151 — what the ISSUE COMMENT endpoints may address.
|
|
760
|
+
//
|
|
761
|
+
// Real GitHub models every pull request as an issue and documents
|
|
762
|
+
// `/repos/:o/:r/issues/:number/comments` as the way to comment on a PR's
|
|
763
|
+
// conversation; `pulls/:number/comments` is the inline REVIEW comment surface,
|
|
764
|
+
// which is a different thing. So a comment target is an issue OR a pull
|
|
765
|
+
// request, and `requireIssue` is too narrow for these two routes — it 404'd
|
|
766
|
+
// every PR comment, including the only one the bundled `pr-summary-*` examples
|
|
767
|
+
// know how to write.
|
|
768
|
+
//
|
|
769
|
+
// Deliberately NOT widened past the comment routes. Everything else reached
|
|
770
|
+
// through `requireIssue` (labels, assignees, state) really is issue-only in
|
|
771
|
+
// this twin, and making a PR answer those would be divergence #16's read half
|
|
772
|
+
// — a bigger change than a comment target, and still out of scope.
|
|
773
|
+
//
|
|
774
|
+
// The lookup order does not matter: `nextNumber()` draws issue and PR numbers
|
|
775
|
+
// from one per-repo counter, so at most one of the two can match.
|
|
776
|
+
//
|
|
777
|
+
// The KIND is returned rather than a boolean because the serializer needs it:
|
|
778
|
+
// GitHub's `html_url` for a comment on a PR is `/pull/N#issuecomment-…`, not
|
|
779
|
+
// `/issues/N#…`, and the twin would otherwise ship a divergence nothing had
|
|
780
|
+
// recorded.
|
|
781
|
+
commentTargetKind(repoId, number) {
|
|
782
|
+
if (this.db.prepare("SELECT 1 FROM issues WHERE repo_id = ? AND number = ?").get(repoId, number)) {
|
|
783
|
+
return "issue";
|
|
784
|
+
}
|
|
785
|
+
if (this.db.prepare("SELECT 1 FROM pull_requests WHERE repo_id = ? AND number = ?").get(repoId, number)) {
|
|
786
|
+
return "pull_request";
|
|
787
|
+
}
|
|
788
|
+
return null;
|
|
789
|
+
}
|
|
790
|
+
requireCommentTarget(repoId, number) {
|
|
791
|
+
// Same sentence `requireIssue` raises: this IS the issues endpoint, and an
|
|
792
|
+
// agent that named a number belonging to neither entity has made the same
|
|
793
|
+
// mistake either way.
|
|
794
|
+
return this.commentTargetKind(repoId, number) ?? notFound("Issue not found");
|
|
795
|
+
}
|
|
748
796
|
listIssueLabels(repoId, issueNumber) {
|
|
749
797
|
return this.db
|
|
750
798
|
.prepare("SELECT labels.* FROM labels INNER JOIN issue_labels ON labels.repo_id = issue_labels.repo_id AND labels.name = issue_labels.label_name WHERE issue_labels.repo_id = ? AND issue_labels.issue_number = ? ORDER BY labels.name ASC")
|