@telora/daemon 0.22.137 → 0.22.144

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.
Files changed (72) hide show
  1. package/build-info.json +13 -3
  2. package/dist/audit/audit-phase.d.ts.map +1 -1
  3. package/dist/audit/audit-phase.js +15 -0
  4. package/dist/audit/audit-phase.js.map +1 -1
  5. package/dist/audit/audit-prompt.d.ts +174 -0
  6. package/dist/audit/audit-prompt.d.ts.map +1 -1
  7. package/dist/audit/audit-prompt.js +365 -2
  8. package/dist/audit/audit-prompt.js.map +1 -1
  9. package/dist/completion/review-coverage-shas.d.ts +49 -0
  10. package/dist/completion/review-coverage-shas.d.ts.map +1 -0
  11. package/dist/completion/review-coverage-shas.js +128 -0
  12. package/dist/completion/review-coverage-shas.js.map +1 -0
  13. package/dist/completion/review-exit-deps.d.ts +15 -2
  14. package/dist/completion/review-exit-deps.d.ts.map +1 -1
  15. package/dist/completion/review-exit-deps.js +9 -3
  16. package/dist/completion/review-exit-deps.js.map +1 -1
  17. package/dist/delivery/delivery-review-coverage.d.ts +200 -0
  18. package/dist/delivery/delivery-review-coverage.d.ts.map +1 -0
  19. package/dist/delivery/delivery-review-coverage.js +192 -0
  20. package/dist/delivery/delivery-review-coverage.js.map +1 -0
  21. package/dist/queries/focus-branch-work-evidence.d.ts +55 -0
  22. package/dist/queries/focus-branch-work-evidence.d.ts.map +1 -0
  23. package/dist/queries/focus-branch-work-evidence.js +65 -0
  24. package/dist/queries/focus-branch-work-evidence.js.map +1 -0
  25. package/dist/queries/focus-criteria-standing.d.ts +138 -0
  26. package/dist/queries/focus-criteria-standing.d.ts.map +1 -0
  27. package/dist/queries/focus-criteria-standing.js +98 -0
  28. package/dist/queries/focus-criteria-standing.js.map +1 -0
  29. package/dist/queries/focus-review-watermark.d.ts +35 -0
  30. package/dist/queries/focus-review-watermark.d.ts.map +1 -0
  31. package/dist/queries/focus-review-watermark.js +47 -0
  32. package/dist/queries/focus-review-watermark.js.map +1 -0
  33. package/dist/queries/focuses.d.ts +0 -9
  34. package/dist/queries/focuses.d.ts.map +1 -1
  35. package/dist/queries/focuses.js +0 -14
  36. package/dist/queries/focuses.js.map +1 -1
  37. package/dist/queries/shared.js +1 -1
  38. package/dist/queries/verification.d.ts +23 -25
  39. package/dist/queries/verification.d.ts.map +1 -1
  40. package/dist/queries/verification.js +66 -45
  41. package/dist/queries/verification.js.map +1 -1
  42. package/dist/resolvers/assembly-engine.d.ts.map +1 -1
  43. package/dist/resolvers/assembly-engine.js +2 -0
  44. package/dist/resolvers/assembly-engine.js.map +1 -1
  45. package/dist/resolvers/focus-criteria-standing.d.ts +24 -0
  46. package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -0
  47. package/dist/resolvers/focus-criteria-standing.js +234 -0
  48. package/dist/resolvers/focus-criteria-standing.js.map +1 -0
  49. package/dist/resolvers/focus-review-coverage.d.ts +189 -0
  50. package/dist/resolvers/focus-review-coverage.d.ts.map +1 -0
  51. package/dist/resolvers/focus-review-coverage.js +487 -0
  52. package/dist/resolvers/focus-review-coverage.js.map +1 -0
  53. package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
  54. package/dist/resolvers/git-diff-against-base.js +11 -0
  55. package/dist/resolvers/git-diff-against-base.js.map +1 -1
  56. package/dist/resolvers/index.d.ts.map +1 -1
  57. package/dist/resolvers/index.js +7 -1
  58. package/dist/resolvers/index.js.map +1 -1
  59. package/dist/resolvers/reality-tree-snapshot.d.ts +9 -4
  60. package/dist/resolvers/reality-tree-snapshot.d.ts.map +1 -1
  61. package/dist/resolvers/reality-tree-snapshot.js +64 -17
  62. package/dist/resolvers/reality-tree-snapshot.js.map +1 -1
  63. package/dist/resolvers/shared/branch-fact-provenance.d.ts +258 -0
  64. package/dist/resolvers/shared/branch-fact-provenance.d.ts.map +1 -0
  65. package/dist/resolvers/shared/branch-fact-provenance.js +571 -0
  66. package/dist/resolvers/shared/branch-fact-provenance.js.map +1 -0
  67. package/dist/resolvers/shared/reality-tree-arrival.d.ts +71 -0
  68. package/dist/resolvers/shared/reality-tree-arrival.d.ts.map +1 -0
  69. package/dist/resolvers/shared/reality-tree-arrival.js +129 -0
  70. package/dist/resolvers/shared/reality-tree-arrival.js.map +1 -0
  71. package/dist/testing/fixtures/index.js +1 -1
  72. package/package.json +2 -2
@@ -0,0 +1,487 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/completion/review-coverage-seam.test.ts,
3
+ // packages/daemon/src/resolvers/focus-review-coverage.test.ts
4
+ // PINNED-BY-END
5
+ import { execFileSync } from 'node:child_process';
6
+ import { registerSourceResolver } from './assembly-engine.js';
7
+ import { getFocusDeliveries, getLatestCompletedFocusReview } from '../queries/focuses.js';
8
+ import { setBranchWorkDeliveryIds } from '../queries/focus-branch-work-evidence.js';
9
+ import { fetchInjectionBundles } from './shared/loop.js';
10
+ import { resolveGitTrailerCommitSet } from './shared/git-diff.js';
11
+ import { BRANCH_FACT_COMMIT_CAP, attributeBranchFacts, attributeLineGrain, readBranchCommitFacts, readFileBlameRanges, renderBranchFactProvenance, renderBranchFactProvenanceUnavailable, } from './shared/branch-fact-provenance.js';
12
+ import { classifyDeliveryReviewCoverage, } from '../delivery/delivery-review-coverage.js';
13
+ import { createLogger } from '../shell/log.js';
14
+ const log = createLogger({ module: 'assembly-engine' });
15
+ /**
16
+ * focus.review_coverage
17
+ *
18
+ * The focus's deliveries PARTITIONED BY REVIEW STATE -- reviewed, unreviewed,
19
+ * no-work-yet -- each named with its injection anchor, and the whole reading
20
+ * carrying the basis it stands on (the coverage watermark and the last
21
+ * completed review's completion time).
22
+ *
23
+ * WHY A SCOPING PASS NEEDS THIS. An audit pass reads the focus branch and sees
24
+ * FACTS: files, behaviours, commits. Round 5 of its prompt then anchors one
25
+ * remediation delivery per injection. Without this section the pass cannot tell
26
+ * whether a fact it just observed came from a delivery a reviewer has looked at
27
+ * or from one still in flight -- so residue of unreviewed work gets anchored as
28
+ * a fresh sibling and the focus grows a backlog with no floor: it re-opens on
29
+ * new work while the pass that produced the work is never judged.
30
+ *
31
+ * AND THE JOIN, NOT JUST THE PARTITION. A partition of DELIVERIES sitting beside
32
+ * a diff of CHANGES leaves the pass to work out which delivery produced which
33
+ * hunk -- the very inference this section exists to remove. So the reading also
34
+ * carries a FACT-LEVEL provenance mapping (commit -> delivery -> review state,
35
+ * and file -> the delivery or deliveries that touched it), built from the
36
+ * durable `Telora-Delivery` trailer by
37
+ * `resolvers/shared/branch-fact-provenance.ts`. A fact it cannot tie to one of
38
+ * this focus's deliveries is rendered UNATTRIBUTED and counted UNREVIEWED; it
39
+ * is never attributed on a guess.
40
+ *
41
+ * READ FROM THE REPOSITORY, NOT FROM A CHECKOUT. The branch reads resolve
42
+ * against `context.worktreePath` when the assembly has one and against
43
+ * `config.repoPath` otherwise. `git log <ref>` reads refs, not the working
44
+ * tree, so a focus with no live worktree -- the audit pass, which assembles
45
+ * with `worktreePath: null` -- still gets a real reading instead of a
46
+ * uniformly-pessimistic one that carries no information at all.
47
+ *
48
+ * FAILS SOFT, NEVER SILENT. Every failure path renders an EXPLICIT failure
49
+ * line. A silently absent section reads to the pass as "there is no unreviewed
50
+ * work here", which is the exact inversion this resolver exists to prevent.
51
+ *
52
+ * The classification rules are NOT re-derived here: they are
53
+ * `delivery/delivery-review-coverage.ts`, the Node mirror of the Deno module
54
+ * the product-api create gate runs, held in agreement by
55
+ * `delivery-review-coverage-parity.test.ts`. So the state this section reports
56
+ * is the same state that gate will enforce.
57
+ */
58
+ /** Section heading, shared by the rendered reading and the failure line. */
59
+ export const REVIEW_COVERAGE_HEADING = '## Delivery review coverage (has a reviewer seen this delivery\'s work?)';
60
+ /** How far an injection statement is quoted in an anchor label. */
61
+ const ANCHOR_STATEMENT_CHARS = 80;
62
+ // ── Pure rendering ───────────────────────────────────────────────────
63
+ /** The basis block. Always rendered -- including when the basis is "none yet". */
64
+ function renderBasis(basis) {
65
+ const watermark = basis.reviewedThroughSha
66
+ ? `\`${basis.reviewedThroughSha}\``
67
+ : '_none -- no review has ever COMPLETED on this focus_';
68
+ const reviewedAt = basis.latestCompletedReviewAt
69
+ ? basis.latestCompletedReviewAt
70
+ : '_none -- no completed focus review exists_';
71
+ const resolutionNote = {
72
+ no_review_yet: 'Merge-commit coverage was not computed: with no completed review there is no covered range.',
73
+ resolved: 'Merge-commit coverage was resolved by ancestry against the watermark commit in the focus repository.',
74
+ no_repo: 'Merge-commit coverage could NOT be computed (no repository path on this assembly), so every merged delivery below is reported UNREVIEWED -- fail closed, not a finding.',
75
+ watermark_unresolvable: 'Merge-commit coverage could NOT be computed (the watermark commit does not resolve in the repository), so every merged delivery below is reported UNREVIEWED -- fail closed, not a finding.',
76
+ };
77
+ return [
78
+ '**Basis of this reading.**',
79
+ `- Review coverage watermark (\`product_focuses.reviewed_through_sha\`): ${watermark}`,
80
+ `- Last COMPLETED focus review finished at: ${reviewedAt}`,
81
+ `- ${resolutionNote[basis.shaResolution]}`,
82
+ ];
83
+ }
84
+ /** One partition, with an explicit `_None._` rather than an omitted heading. */
85
+ function renderPartition(heading, rows) {
86
+ const lines = [`### ${heading} (${rows.length})`, ''];
87
+ if (rows.length === 0) {
88
+ lines.push('_None._');
89
+ return lines;
90
+ }
91
+ for (const row of rows) {
92
+ const status = row.executionStatus ? `\`${row.executionStatus}\`` : '`(no status)`';
93
+ const anchor = row.anchor ? row.anchor : 'not anchored to an injection';
94
+ lines.push(`- **${row.name}** (\`${row.id}\`) -- status ${status} -- ${anchor} -- basis: \`${row.reason}\``);
95
+ }
96
+ return lines;
97
+ }
98
+ /** The closing reading rule. The full instruction lives in the audit prompt. */
99
+ const READING_RULE = [
100
+ '**How to read this.** A fact you observe in the focus branch was produced by one of these',
101
+ 'deliveries -- the provenance mapping below says WHICH, per commit and per file. Residue of an',
102
+ 'UNREVIEWED delivery is not new information -- the review that has not happened yet is where it',
103
+ 'belongs -- so put it on that delivery rather than anchoring a new one. Anchor only what is a',
104
+ 'genuinely new root cause, and declare it (see the anchoring round).',
105
+ ];
106
+ /**
107
+ * Render the partitioned reading, with the fact-level provenance mapping
108
+ * appended. `provenance` is ALWAYS a rendered block -- the reading or the
109
+ * explicit NOT AVAILABLE line -- never an empty string, so the partition is
110
+ * never presented without saying how to join a fact to it.
111
+ */
112
+ export function renderFocusReviewCoverage(rows, basis, provenance) {
113
+ const lines = [REVIEW_COVERAGE_HEADING, '', ...renderBasis(basis), ''];
114
+ if (rows.length === 0) {
115
+ lines.push('_This focus carries no deliveries yet, so NO fact on the branch can be attributed to one._', '', provenance);
116
+ return lines.join('\n');
117
+ }
118
+ const bucket = (c) => rows.filter((r) => r.coverage === c);
119
+ lines.push(...renderPartition('UNREVIEWED -- no completed review has covered this work', bucket('unreviewed')), '', ...renderPartition('REVIEWED -- a completed focus review covered this work', bucket('reviewed')), '', ...renderPartition('NO WORK YET -- nothing that could be residue', bucket('no_work_yet')), '', ...READING_RULE, '', provenance);
120
+ return lines.join('\n');
121
+ }
122
+ /**
123
+ * Render the EXPLICIT failure line. Rendered instead of nothing on every read
124
+ * failure, because an absent section reads as "no unreviewed work".
125
+ */
126
+ export function renderFocusReviewCoverageFailure(reason) {
127
+ return [
128
+ REVIEW_COVERAGE_HEADING,
129
+ '',
130
+ '**READ FAILED -- the review state of this focus is UNKNOWN.**',
131
+ `Reason: ${reason}`,
132
+ '',
133
+ 'This section could not be computed, which is NOT the same as "nothing is unreviewed".',
134
+ 'Treat EVERY delivery on this focus as UNREVIEWED: hold residue rather than anchoring it,',
135
+ 'and anchor only a genuinely new root cause, declared as the anchoring round requires.',
136
+ ].join('\n');
137
+ }
138
+ const GIT_OPTS = {
139
+ maxBuffer: 1024 * 1024,
140
+ encoding: 'utf-8',
141
+ stdio: ['ignore', 'pipe', 'pipe'],
142
+ };
143
+ function gitSucceeds(args, cwd) {
144
+ try {
145
+ execFileSync('git', args, { ...GIT_OPTS, cwd });
146
+ return true;
147
+ }
148
+ catch {
149
+ return false;
150
+ }
151
+ }
152
+ /**
153
+ * The focus's coverage watermark, and whether the focus row was found at all.
154
+ *
155
+ * `queries/focus-discovery.js` is reached through a DEFERRED dynamic import, not
156
+ * a static one. A static import would put it (and its zod validation chain) in
157
+ * the module graph of `resolvers/index.js`, which several resolver tests load
158
+ * while holding a partial `mock.module` over `queries/shared.js` -- under the
159
+ * tsx mock loader a partial namespace makes every unlisted export of the mocked
160
+ * module a load-time SyntaxError for anything that imports it. Deferring the
161
+ * import keeps that chain out of every test that does not actually run this
162
+ * resolver, which is the documented escape (see packages/daemon/CLAUDE.md on
163
+ * the mock-loader quirk, and `listener-auto-advance.ts` for the same move).
164
+ */
165
+ async function readReviewedThroughSha(context) {
166
+ const { getActiveFocuses } = await import('../queries/focus-discovery.js');
167
+ const focuses = await getActiveFocuses(context.organizationId, context.productId);
168
+ const row = focuses.find((f) => f.focus_id === context.focusId);
169
+ if (!row)
170
+ return { found: false, sha: null, branchName: null };
171
+ return { found: true, sha: row.reviewed_through_sha, branchName: row.branch_name };
172
+ }
173
+ /** Anchor labels keyed by injection node id; best-effort (an empty map degrades to ids). */
174
+ async function readAnchorLabels(injectionIds) {
175
+ const labels = new Map();
176
+ if (injectionIds.length === 0)
177
+ return labels;
178
+ const bundles = await fetchInjectionBundles(injectionIds);
179
+ for (const [id, bundle] of bundles) {
180
+ const statement = bundle.injection.statement.trim();
181
+ const quoted = statement.length > ANCHOR_STATEMENT_CHARS
182
+ ? `${statement.slice(0, ANCHOR_STATEMENT_CHARS)}...`
183
+ : statement;
184
+ labels.set(id, `anchored to injection #${bundle.injection.seq} "${quoted}"`);
185
+ }
186
+ return labels;
187
+ }
188
+ /**
189
+ * The PRODUCTION wiring: the real queries, a real git process, and the real
190
+ * evidence writes. Exported because the binding itself is a failure mode --
191
+ * swap `persistBranchWork` for a no-op and every behavioural test below stays
192
+ * green while the create gate goes blind -- so the cross-runtime seam test
193
+ * (`completion/review-coverage-seam.test.ts`) drives THESE, replacing only the
194
+ * DB reads and the transport under the production write.
195
+ */
196
+ export const defaultFocusReviewCoverageDeps = {
197
+ getFocusDeliveries,
198
+ getReviewedThroughSha: readReviewedThroughSha,
199
+ getLatestCompletedReviewAt: async (focusId) => (await getLatestCompletedFocusReview(focusId))?.completedAt ?? null,
200
+ getAnchorLabels: readAnchorLabels,
201
+ isAncestor: (repoPath, sha, tip) => gitSucceeds(['merge-base', '--is-ancestor', sha, tip], repoPath),
202
+ commitResolves: (repoPath, sha) => gitSucceeds(['rev-parse', '--verify', '--quiet', `${sha}^{commit}`], repoPath),
203
+ hasBranchCommits: (repoPath, ref, deliveryId) => resolveGitTrailerCommitSet(repoPath, ref, deliveryId).length > 0,
204
+ readBranchFacts: (repoPath, base, ref) => readBranchCommitFacts(repoPath, base, ref, BRANCH_FACT_COMMIT_CAP),
205
+ readBlameRanges: (repoPath, tip, path) => readFileBlameRanges(repoPath, tip, path),
206
+ persistBranchWork: setBranchWorkDeliveryIds,
207
+ };
208
+ /**
209
+ * The merge shas the completed review covered: each delivery's merge commit
210
+ * that is an ANCESTOR of the watermark. Ancestry (rather than a rev-list of the
211
+ * whole range) is asked per delivery because the range's base is not a fact
212
+ * this resolver owns, and a delivery merged before the base moved would be
213
+ * missed by a range walk. Every unresolvable input yields a SMALLER covered set
214
+ * -- fail closed.
215
+ */
216
+ function resolveCoveredShas(repoPath, watermark, mergeShas, deps) {
217
+ if (!watermark || watermark.trim() === '')
218
+ return { covered: [], resolution: 'no_review_yet' };
219
+ if (!repoPath)
220
+ return { covered: [], resolution: 'no_repo' };
221
+ if (!deps.commitResolves(repoPath, watermark)) {
222
+ return { covered: [], resolution: 'watermark_unresolvable' };
223
+ }
224
+ const covered = mergeShas.filter((sha) => deps.isAncestor(repoPath, sha, watermark));
225
+ return { covered, resolution: 'resolved' };
226
+ }
227
+ /**
228
+ * WHERE the branch reads run and WHICH ref they read.
229
+ *
230
+ * `git log <ref>` / `merge-base --is-ancestor` read REFS, not a working tree,
231
+ * so an assembly with no worktree (the audit pass) can still read the focus's
232
+ * branch out of the daemon's main repository. The ref is the focus's pinned
233
+ * `branch_name` when it has one; with a worktree and no pinned name, that
234
+ * worktree's `HEAD` is the branch by construction. Null ref = nothing to read.
235
+ */
236
+ export function resolveBranchReadTarget(context, branchName) {
237
+ const repoPath = context.worktreePath ?? (context.config.repoPath || null);
238
+ const pinned = (branchName ?? '').trim();
239
+ const ref = pinned !== '' ? pinned : (context.worktreePath ? 'HEAD' : null);
240
+ return { repoPath, ref };
241
+ }
242
+ /**
243
+ * Classify ONE delivery, consulting the branch for committed work only when
244
+ * that evidence could change the answer.
245
+ *
246
+ * The branch reading is POSITIVE-ONLY now (see `resolveBranchWorkEvidence`):
247
+ * finding a trailer-bearing commit makes a row work-bearing, and finding none
248
+ * establishes nothing at all. So the only row a trailer search can move is one
249
+ * the classifier already calls `no_work_yet` on its own columns, and that is
250
+ * the only row that pays for a git call -- which is CHEAPER than the rule it
251
+ * replaces, not merely different, because the cancelled rows that used to be
252
+ * probed for an emptiness proof are now held on their own.
253
+ *
254
+ * And it keeps the pass and the gate reading the same state. The gate sees the
255
+ * reading this pass persists; a `true` here is exactly what it will find, and
256
+ * a non-`true` leaves the row where the columns already put it, which is
257
+ * exactly where the gate leaves it too.
258
+ */
259
+ function classifyWithBranchEvidence(input, focus, probeBranch) {
260
+ const onItsOwnColumns = classifyDeliveryReviewCoverage(input, focus);
261
+ if (onItsOwnColumns.coverage !== 'no_work_yet')
262
+ return onItsOwnColumns;
263
+ if (probeBranch(input.id) !== true)
264
+ return onItsOwnColumns;
265
+ return classifyDeliveryReviewCoverage({ ...input, hasCommittedWork: true }, focus);
266
+ }
267
+ /** Classify every delivery and attach its anchor label. */
268
+ function classifyDeliveries(deliveries, focus, anchorLabels, probeBranch) {
269
+ return deliveries.map((d) => {
270
+ const { coverage, reason } = classifyWithBranchEvidence({
271
+ id: d.id,
272
+ name: d.name,
273
+ executionStatus: d.executionStatus,
274
+ mergeCommitSha: d.mergeCommitSha,
275
+ // Not carried on the daemon's delivery wire shape -- and never consulted
276
+ // by the classifier (see its field doc), so its absence decides nothing.
277
+ autoApprovedAt: undefined,
278
+ updatedAt: d.updatedAt,
279
+ iterationCount: d.iterationCount,
280
+ }, focus, probeBranch);
281
+ const injectionId = typeof d.injectionId === 'string' && d.injectionId.length > 0 ? d.injectionId : null;
282
+ const anchor = injectionId
283
+ ? anchorLabels.get(injectionId) ?? `anchored to injection \`${injectionId}\``
284
+ : null;
285
+ return { id: d.id, name: d.name, executionStatus: d.executionStatus, coverage, reason, anchor };
286
+ });
287
+ }
288
+ function makeBranchWorkEvidence(target, deps) {
289
+ const { repoPath, ref } = target;
290
+ const found = [];
291
+ let unreadable = false;
292
+ // Does the ref resolve at all? Asked at most once, and asked BEFORE any
293
+ // trailer search, because that search swallows git errors as an empty set
294
+ // (`resolveGitTrailerCommitSet`): against an unresolvable ref it would
295
+ // answer "looked, found none" for every delivery, which is the one answer
296
+ // that releases the carve-out. Resolved lazily so a focus with no at-stake
297
+ // row pays for no git call, and memoized so the probe and `resolved()`
298
+ // cannot disagree about the same ref.
299
+ let refResolves = null;
300
+ const refReadable = () => {
301
+ if (!repoPath || !ref)
302
+ return false;
303
+ if (refResolves === null)
304
+ refResolves = deps.commitResolves(repoPath, ref);
305
+ return refResolves;
306
+ };
307
+ const probe = (deliveryId) => {
308
+ // No repository or no ref, nothing to search. UNDEFINED rather than false
309
+ // because the two are different facts, even though neither releases
310
+ // anything: `false` says a repository was searched, and this pass will go
311
+ // on to WRITE what it searched. Nobody looked, so nobody may record a
312
+ // search.
313
+ if (!repoPath || !ref || !refReadable())
314
+ return undefined;
315
+ try {
316
+ const hit = deps.hasBranchCommits(repoPath, ref, deliveryId);
317
+ if (hit)
318
+ found.push(deliveryId);
319
+ return hit;
320
+ }
321
+ catch (err) {
322
+ log.warn(`focus.review_coverage: branch evidence unreadable for ${deliveryId}: ${err.message}`);
323
+ unreadable = true;
324
+ return undefined;
325
+ }
326
+ };
327
+ const resolved = () => {
328
+ if (!repoPath || !ref || unreadable)
329
+ return null;
330
+ return refReadable() ? found : null;
331
+ };
332
+ return { probe, resolved };
333
+ }
334
+ /**
335
+ * Hand the resolved evidence to the gate that cannot derive it -- and when that
336
+ * hand-off fails, say so instead of rendering a reading the gate cannot back.
337
+ *
338
+ * Written HERE rather than at review exit because this is the moment the fact
339
+ * is both true and needed: the scoping pass reads this section and then
340
+ * anchors deliveries through the create gate, so persisting at the read makes
341
+ * the gate enforce the state the pass was shown.
342
+ *
343
+ * THE FAILURE IS NOT BEST-EFFORT. It was, and that was the defect: a write
344
+ * that threw was logged and swallowed, and the pass still got a normal
345
+ * create-capable reading naming residue the gate had never been told about.
346
+ * A rendering concern may be best-effort; an ENFORCEMENT INPUT may not. So a
347
+ * failure returns a REASON and the caller renders the explicit unknown-state
348
+ * section in place of the partitioned reading.
349
+ *
350
+ * AND THERE IS NO SECOND WRITE. There used to be: a failed reading was
351
+ * followed by a clear-to-unknown, so a previous pass's answer could not go on
352
+ * speaking for a reading that never arrived. That compensation is gone, and
353
+ * its removal is the FIX rather than a simplification of it. It only ever
354
+ * made sense while a stored empty reading could RELEASE a hold; now that a
355
+ * stored reading is positive-only (`resolveBranchWorkEvidence`), clearing the
356
+ * column WITHDRAWS holds and adds none, so on a failed write it is the one
357
+ * action that could make things worse. Leaving the stored reading in place is
358
+ * now the conservative act, and it needs no write at all -- which matters,
359
+ * because the failure this path runs in is precisely the one where no write
360
+ * lands.
361
+ *
362
+ * Returns null when there is nothing to report.
363
+ */
364
+ async function persistBranchWorkEvidence(focusId, resolved, deps) {
365
+ // Unaskable: leave whatever an earlier, readable pass recorded. Overwriting
366
+ // it with this pass's empty list would withdraw holds on evidence that has
367
+ // not gone away.
368
+ if (resolved === null)
369
+ return null;
370
+ try {
371
+ await deps.persistBranchWork(focusId, resolved);
372
+ return null;
373
+ }
374
+ catch (err) {
375
+ const message = err.message;
376
+ log.warn(`focus.review_coverage: branch work evidence not persisted for ${focusId}: ${message}`);
377
+ return (`the branch committed-work evidence this reading resolved could NOT be handed to the ` +
378
+ `delivery-create gate (${message}). That gate holds on the absence of evidence and never ` +
379
+ `RELEASES on a stored reading, so nothing this pass proved has been turned into a release ` +
380
+ `-- but any committed work it FOUND is not in the gate's view either, so do not read a ` +
381
+ `create that succeeds as a statement that the branch is clean.`);
382
+ }
383
+ }
384
+ /**
385
+ * Resolve the section. Exported (with an injectable deps seam) so tests drive
386
+ * it without registering a module mock.
387
+ */
388
+ export async function resolveFocusReviewCoverage(context, deps = defaultFocusReviewCoverageDeps) {
389
+ let deliveries;
390
+ let watermark;
391
+ let latestCompletedReviewAt;
392
+ try {
393
+ [deliveries, watermark, latestCompletedReviewAt] = await Promise.all([
394
+ deps.getFocusDeliveries(context.focusId),
395
+ deps.getReviewedThroughSha(context),
396
+ deps.getLatestCompletedReviewAt(context.focusId),
397
+ ]);
398
+ }
399
+ catch (err) {
400
+ const message = err.message;
401
+ log.warn(`focus.review_coverage: read failed: ${message}`);
402
+ return renderFocusReviewCoverageFailure(`the review-state read failed (${message})`);
403
+ }
404
+ if (!watermark.found) {
405
+ log.warn(`focus.review_coverage: focus ${context.focusId} not returned by the active-focus read`);
406
+ return renderFocusReviewCoverageFailure('the focus row was not returned by the active-focus read, so its review coverage ' +
407
+ 'watermark could not be read');
408
+ }
409
+ const { repoPath, ref } = resolveBranchReadTarget(context, watermark.branchName);
410
+ const mergeShas = deliveries
411
+ .map((d) => (typeof d.mergeCommitSha === 'string' ? d.mergeCommitSha.trim() : ''))
412
+ .filter((sha) => sha !== '');
413
+ const { covered, resolution } = resolveCoveredShas(repoPath, watermark.sha, mergeShas, deps);
414
+ let anchorLabels = new Map();
415
+ try {
416
+ const injectionIds = deliveries
417
+ .map((d) => d.injectionId)
418
+ .filter((id) => typeof id === 'string' && id.length > 0);
419
+ anchorLabels = await deps.getAnchorLabels(injectionIds);
420
+ }
421
+ catch (err) {
422
+ // An unreadable anchor label costs a NAME, not a coverage fact: the rows
423
+ // fall back to the raw injection id and the reading stands.
424
+ log.warn(`focus.review_coverage: anchor labels unreadable: ${err.message}`);
425
+ }
426
+ const evidence = makeBranchWorkEvidence({ repoPath, ref }, deps);
427
+ const rows = classifyDeliveries(deliveries, {
428
+ reviewedThroughSha: watermark.sha,
429
+ latestCompletedReviewAt,
430
+ coveredShas: covered,
431
+ }, anchorLabels, evidence.probe);
432
+ const evidenceFailure = await persistBranchWorkEvidence(context.focusId, evidence.resolved(), deps);
433
+ // The reading below is only honest while the gate can enforce it. It cannot,
434
+ // so the section states the unknown instead of implying a hold that is not
435
+ // there -- the same rule every other read failure here already follows.
436
+ if (evidenceFailure !== null)
437
+ return renderFocusReviewCoverageFailure(evidenceFailure);
438
+ return renderFocusReviewCoverage(rows, {
439
+ reviewedThroughSha: watermark.sha,
440
+ latestCompletedReviewAt,
441
+ shaResolution: resolution,
442
+ }, resolveFactProvenance(rows, { repoPath, ref, base: context.config.integrationBranch }, deps));
443
+ }
444
+ /**
445
+ * Build the fact-level provenance block from the SAME classified rows the
446
+ * partition rendered, so a delivery's review state cannot differ between the
447
+ * two halves of one section. Every path returns a rendered block: an
448
+ * unreadable branch renders the explicit NOT AVAILABLE line, never nothing.
449
+ */
450
+ function resolveFactProvenance(rows, target, deps) {
451
+ if (!target.repoPath) {
452
+ return renderBranchFactProvenanceUnavailable('no repository path on this assembly, so the focus branch could not be read');
453
+ }
454
+ if (!target.ref) {
455
+ return renderBranchFactProvenanceUnavailable('this focus pins no git branch (`product_focuses.branch_name` is null) and the assembly has '
456
+ + 'no worktree, so there is no ref to read its commits from');
457
+ }
458
+ const base = (target.base ?? '').trim();
459
+ if (base === '') {
460
+ return renderBranchFactProvenanceUnavailable('the product declares no integration branch, so the branch window has no base to read against');
461
+ }
462
+ let facts;
463
+ try {
464
+ facts = deps.readBranchFacts(target.repoPath, base, target.ref);
465
+ }
466
+ catch (err) {
467
+ facts = null;
468
+ log.warn(`focus.review_coverage: branch fact read threw: ${err.message}`);
469
+ }
470
+ if (facts === null) {
471
+ return renderBranchFactProvenanceUnavailable(`git could not read \`${base}..${target.ref}\` in ${target.repoPath} (an unfetched or rewritten ref, `
472
+ + 'or an unreadable repository)');
473
+ }
474
+ const provenance = attributeBranchFacts(facts, rows.map((r) => ({ id: r.id, name: r.name, reviewed: r.coverage === 'reviewed' })), { base, tip: target.ref, capped: facts.length >= BRANCH_FACT_COMMIT_CAP });
475
+ // Descend to LINE grain for the files more than one contributor touched: a
476
+ // file a reviewed and an unreviewed delivery both touched cannot answer
477
+ // "whose line is this?" at file grain. Locals because TS drops the
478
+ // null-narrowing of target.repoPath / target.ref inside the closure.
479
+ const repoPath = target.repoPath;
480
+ const tip = target.ref;
481
+ return renderBranchFactProvenance(attributeLineGrain(provenance, (path) => deps.readBlameRanges(repoPath, tip, path)));
482
+ }
483
+ /** Register this module's resolver(s). Called from initResolvers() -- not an import side effect. */
484
+ export function registerFocusReviewCoverageResolver() {
485
+ registerSourceResolver('focus.review_coverage', async (context) => resolveFocusReviewCoverage(context));
486
+ }
487
+ //# sourceMappingURL=focus-review-coverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-review-coverage.js","sourceRoot":"","sources":["../../src/resolvers/focus-review-coverage.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0EAA0E;AAC1E,gEAAgE;AAChE,gBAAgB;AAEhB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EAC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G,MAAM,CAAC,QAAQ,CAAC;IACjC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;IACvB,OAAO,0BAA0B,CAC/B,kBAAkB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CACpF,CAAC;AACJ,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,mCAAmC;IACjD,sBAAsB,CAAC,uBAAuB,EAAE,KAAK,EAAE,OAAwB,EAAmB,EAAE,CAClG,0BAA0B,CAAC,OAAO,CAAC,CAAC,CAAC;AACzC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"git-diff-against-base.d.ts","sourceRoot":"","sources":["../../src/resolvers/git-diff-against-base.ts"],"names":[],"mappings":"AAwJA;;;;;;;;GAQG;AACH,oGAAoG;AACpG,wBAAgB,kCAAkC,IAAI,IAAI,CAgBzD"}
1
+ {"version":3,"file":"git-diff-against-base.d.ts","sourceRoot":"","sources":["../../src/resolvers/git-diff-against-base.ts"],"names":[],"mappings":"AAwJA;;;;;;;;GAQG;AACH,oGAAoG;AACpG,wBAAgB,kCAAkC,IAAI,IAAI,CA2BzD"}
@@ -128,6 +128,17 @@ function renderOwnScopedDiff(baseBranch, foreign, own) {
128
128
  /** Register this module's resolver(s). Called from initResolvers() -- not an import side effect. */
129
129
  export function registerGitDiffAgainstBaseResolver() {
130
130
  registerSourceResolver('git.diff_against_base', async (context) => {
131
+ // NOTE (2026-09-18) -- this branch is TAKEN on every AUDIT pass, not just
132
+ // in error. `audit/audit-phase.ts` assembles with `worktreePath: null`, so
133
+ // this resolver is INERT there: the audit recipe lists
134
+ // `git.diff_against_base` and it contributes nothing. The scoping pass
135
+ // therefore observes NO diff facts at all, and any fact-level provenance
136
+ // attached HERE would be attached to a section that never renders for it.
137
+ // That is why the commit/file -> delivery -> review-state mapping lives in
138
+ // the `focus.review_coverage` section, built by
139
+ // `resolvers/shared/branch-fact-provenance.ts`: it reads the focus branch
140
+ // by REF out of the repo path, so it renders with or without a worktree.
141
+ // Do not add it here expecting the audit pass to see it.
131
142
  if (!context.worktreePath) {
132
143
  log.warn('git.diff_against_base: no worktree path available');
133
144
  return '';
@@ -1 +1 @@
1
- {"version":3,"file":"git-diff-against-base.js","sourceRoot":"","sources":["../../src/resolvers/git-diff-against-base.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,gFAAgF;AAChF,gBAAgB;AAEhB,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EACL,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,GAG7B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAUxD;;;;;;;;;GASG;AACH,SAAS,eAAe,CAAC,OAAwB,EAAE,YAAoB,EAAE,UAAkB;IACzF,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;IACxE,MAAM,OAAO,GAAG,uBAAuB,CAAC,YAAY,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAC1E,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;IAChD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,4BAA4B,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;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CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACzE,OAAO,KAAK,CAAC,GAAG;YACd,CAAC,CAAC,mBAAmB,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC;YAC3D,CAAC,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACpF,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAmHA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAgBxC;AAGD,OAAO,EACL,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,+BAA+B,EAC/B,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,kCAAkC,EAClC,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpI,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAyHA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAgBxC;AAGD,OAAO,EACL,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,+BAA+B,EAC/B,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,kCAAkC,EAClC,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpI,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
@@ -1,6 +1,8 @@
1
1
  // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
2
  // Pinned by: packages/daemon/src/queries/focus-needs-injection.test.ts,
3
- // packages/daemon/src/resolvers/focus-endpoint-catalog.test.ts
3
+ // packages/daemon/src/resolvers/focus-criteria-standing.test.ts,
4
+ // packages/daemon/src/resolvers/focus-endpoint-catalog.test.ts,
5
+ // packages/daemon/src/resolvers/focus-review-coverage.test.ts
4
6
  // PINNED-BY-END
5
7
  /**
6
8
  * Barrel for the Context Assembly Engine source resolvers.
@@ -61,6 +63,8 @@ import { registerRealityTreeSnapshotResolver } from './reality-tree-snapshot.js'
61
63
  import { registerPrdPersonaResolver } from './prd-persona.js';
62
64
  import { registerPrdContextResolver } from './prd-context.js';
63
65
  import { registerFocusEndpointCatalogResolver } from './focus-endpoint-catalog.js';
66
+ import { registerFocusReviewCoverageResolver } from './focus-review-coverage.js';
67
+ import { registerFocusCriteriaStandingResolver } from './focus-criteria-standing.js';
64
68
  import { registerLinearLinkedIssuesResolver } from './linear-linked-issues.js';
65
69
  // ── Explicit registration ─────────────────────────────────────────────
66
70
  /** All register functions, in the order they historically registered. */
@@ -103,6 +107,8 @@ const REGISTER_FUNCTIONS = [
103
107
  registerPrdPersonaResolver,
104
108
  registerPrdContextResolver,
105
109
  registerFocusEndpointCatalogResolver,
110
+ registerFocusReviewCoverageResolver,
111
+ registerFocusCriteriaStandingResolver,
106
112
  registerLinearLinkedIssuesResolver,
107
113
  ];
108
114
  let initialized = false;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wEAAwE;AACxE,iEAAiE;AACjE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAE,0CAA0C,EAAE,MAAM,mCAAmC,CAAC;AAC/F,OAAO,EAAE,mCAAmC,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,qCAAqC,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,C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AC,WAAW,EAAE,CAAC;QACjB,KAAK,MAAM,QAAQ,IAAI,kBAAkB,EAAE,CAAC;YAC1C,QAAQ,EAAE,CAAC;QACb,CAAC;QACD,WAAW,GAAG,IAAI,CAAC;IACrB,CAAC;IACD,MAAM,IAAI,GAAG,0BAA0B,EAAE,CAAC;IAC1C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,2EAA2E;YAC3E,mEAAmE;YACnE,kEAAkE,CACnE,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,yEAAyE;AACzE,OAAO,EACL,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,+BAA+B,EAC/B,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,kCAAkC,EAClC,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wEAAwE;AACxE,mEAAmE;AACnE,kEAAkE;AAClE,gEAAgE;AAChE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAE,0CAA0C,EAAE,MAAM,mCAA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AC1B,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC"}
@@ -1,10 +1,15 @@
1
1
  /**
2
2
  * reality_tree.snapshot
3
3
  *
4
- * Returns the focus's reality tree(s) as a structured text dump for the
5
- * audit assessor. Same shape as focus.reality_tree but with the "CRT Dump"
6
- * heading renamed to "Snapshot" so the audit prompt distinguishes its
7
- * "current graph" input from other tree-related sections. Fails soft.
4
+ * Returns the focus's reality tree(s) as a structured text dump for the audit
5
+ * assessor. Same shape as focus.reality_tree but with the "CRT Dump" heading
6
+ * renamed to "Snapshot" so the audit prompt distinguishes its "current graph"
7
+ * input from other tree-related sections, and with each tree's canonical
8
+ * ARRIVAL verdict appended.
9
+ *
10
+ * Fails SOFT but never SILENT: a failed read renders an explicit READ FAILED
11
+ * state rather than an empty section, which the assessor cannot tell apart
12
+ * from a focus with no tree -- and therefore from a finished one.
8
13
  */
9
14
  /** Register this module's resolver(s). Called from initResolvers() -- not an import side effect. */
10
15
  export declare function registerRealityTreeSnapshotResolver(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"reality-tree-snapshot.d.ts","sourceRoot":"","sources":["../../src/resolvers/reality-tree-snapshot.ts"],"names":[],"mappings":"AAmBA;;;;;;;GAOG;AACH,oGAAoG;AACpG,wBAAgB,mCAAmC,IAAI,IAAI,CAmC1D"}
1
+ {"version":3,"file":"reality-tree-snapshot.d.ts","sourceRoot":"","sources":["../../src/resolvers/reality-tree-snapshot.ts"],"names":[],"mappings":"AA2EA;;;;;;;;;;;;GAYG;AACH,oGAAoG;AACpG,wBAAgB,mCAAmC,IAAI,IAAI,CAyB1D"}