looply-cli 0.5.51 → 0.5.53

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 (142) hide show
  1. package/dist/account-connect.d.ts +2 -1
  2. package/dist/account-connect.d.ts.map +1 -1
  3. package/dist/account-connect.js.map +1 -1
  4. package/dist/adaptive-budget.d.ts +6 -0
  5. package/dist/adaptive-budget.d.ts.map +1 -1
  6. package/dist/adaptive-budget.js +9 -0
  7. package/dist/adaptive-budget.js.map +1 -1
  8. package/dist/autonomy-controller.d.ts.map +1 -1
  9. package/dist/autonomy-controller.js +19 -0
  10. package/dist/autonomy-controller.js.map +1 -1
  11. package/dist/base-check-turns.d.ts +38 -0
  12. package/dist/base-check-turns.d.ts.map +1 -0
  13. package/dist/base-check-turns.js +118 -0
  14. package/dist/base-check-turns.js.map +1 -0
  15. package/dist/bin.d.ts.map +1 -1
  16. package/dist/bin.js +32 -2
  17. package/dist/bin.js.map +1 -1
  18. package/dist/branch-delivery.d.ts +48 -1
  19. package/dist/branch-delivery.d.ts.map +1 -1
  20. package/dist/branch-delivery.js +203 -4
  21. package/dist/branch-delivery.js.map +1 -1
  22. package/dist/bug-repro.d.ts +89 -9
  23. package/dist/bug-repro.d.ts.map +1 -1
  24. package/dist/bug-repro.js +242 -14
  25. package/dist/bug-repro.js.map +1 -1
  26. package/dist/checkout-carry.d.ts +31 -0
  27. package/dist/checkout-carry.d.ts.map +1 -1
  28. package/dist/checkout-carry.js +98 -3
  29. package/dist/checkout-carry.js.map +1 -1
  30. package/dist/checkout-deps.d.ts +2 -0
  31. package/dist/checkout-deps.d.ts.map +1 -1
  32. package/dist/checkout-deps.js +2 -0
  33. package/dist/checkout-deps.js.map +1 -1
  34. package/dist/daemon-cmd.d.ts +1 -1
  35. package/dist/daemon-cmd.d.ts.map +1 -1
  36. package/dist/daemon-cmd.js +10 -3
  37. package/dist/daemon-cmd.js.map +1 -1
  38. package/dist/fresh-gates.d.ts.map +1 -1
  39. package/dist/fresh-gates.js +13 -0
  40. package/dist/fresh-gates.js.map +1 -1
  41. package/dist/gate-health.d.ts +2 -0
  42. package/dist/gate-health.d.ts.map +1 -1
  43. package/dist/gate-health.js +41 -4
  44. package/dist/gate-health.js.map +1 -1
  45. package/dist/goal-adaptive.d.ts +45 -3
  46. package/dist/goal-adaptive.d.ts.map +1 -1
  47. package/dist/goal-adaptive.js +104 -16
  48. package/dist/goal-adaptive.js.map +1 -1
  49. package/dist/goal-already-met.d.ts +62 -0
  50. package/dist/goal-already-met.d.ts.map +1 -0
  51. package/dist/goal-already-met.js +95 -0
  52. package/dist/goal-already-met.js.map +1 -0
  53. package/dist/goal-execution-evidence.d.ts +7 -1
  54. package/dist/goal-execution-evidence.d.ts.map +1 -1
  55. package/dist/goal-execution-evidence.js +12 -1
  56. package/dist/goal-execution-evidence.js.map +1 -1
  57. package/dist/goal-gap.d.ts +48 -5
  58. package/dist/goal-gap.d.ts.map +1 -1
  59. package/dist/goal-gap.js +103 -13
  60. package/dist/goal-gap.js.map +1 -1
  61. package/dist/integration-deps.d.ts.map +1 -1
  62. package/dist/integration-deps.js +18 -0
  63. package/dist/integration-deps.js.map +1 -1
  64. package/dist/machine-settings.d.ts +9 -0
  65. package/dist/machine-settings.d.ts.map +1 -1
  66. package/dist/machine-settings.js +35 -2
  67. package/dist/machine-settings.js.map +1 -1
  68. package/dist/output-gist.d.ts +40 -0
  69. package/dist/output-gist.d.ts.map +1 -0
  70. package/dist/output-gist.js +107 -0
  71. package/dist/output-gist.js.map +1 -0
  72. package/dist/plan-recovery.d.ts +14 -3
  73. package/dist/plan-recovery.d.ts.map +1 -1
  74. package/dist/plan-recovery.js +24 -6
  75. package/dist/plan-recovery.js.map +1 -1
  76. package/dist/provider-accounts.d.ts +0 -6
  77. package/dist/provider-accounts.d.ts.map +1 -1
  78. package/dist/provider-accounts.js +0 -6
  79. package/dist/provider-accounts.js.map +1 -1
  80. package/dist/pursuit-ending.d.ts.map +1 -1
  81. package/dist/pursuit-ending.js +11 -0
  82. package/dist/pursuit-ending.js.map +1 -1
  83. package/dist/quarantine-report.d.ts +32 -0
  84. package/dist/quarantine-report.d.ts.map +1 -0
  85. package/dist/quarantine-report.js +75 -0
  86. package/dist/quarantine-report.js.map +1 -0
  87. package/dist/round-runner.d.ts +13 -2
  88. package/dist/round-runner.d.ts.map +1 -1
  89. package/dist/round-runner.js +5 -1
  90. package/dist/round-runner.js.map +1 -1
  91. package/dist/run-cmd.d.ts.map +1 -1
  92. package/dist/run-cmd.js +84 -11
  93. package/dist/run-cmd.js.map +1 -1
  94. package/dist/self-update.d.ts.map +1 -1
  95. package/dist/self-update.js +5 -15
  96. package/dist/self-update.js.map +1 -1
  97. package/dist/serve-cmd.d.ts +9 -0
  98. package/dist/serve-cmd.d.ts.map +1 -1
  99. package/dist/serve-cmd.js +45 -1
  100. package/dist/serve-cmd.js.map +1 -1
  101. package/dist/serve-log.d.ts +52 -0
  102. package/dist/serve-log.d.ts.map +1 -0
  103. package/dist/serve-log.js +146 -0
  104. package/dist/serve-log.js.map +1 -0
  105. package/dist/serve.d.ts +7 -7
  106. package/dist/serve.d.ts.map +1 -1
  107. package/dist/serve.js +11 -15
  108. package/dist/serve.js.map +1 -1
  109. package/dist/server-client.d.ts +14 -2
  110. package/dist/server-client.d.ts.map +1 -1
  111. package/dist/server-client.js +24 -2
  112. package/dist/server-client.js.map +1 -1
  113. package/dist/setup-check-wiring.d.ts +8 -0
  114. package/dist/setup-check-wiring.d.ts.map +1 -1
  115. package/dist/setup-check-wiring.js +78 -22
  116. package/dist/setup-check-wiring.js.map +1 -1
  117. package/dist/setup-check.d.ts +4 -0
  118. package/dist/setup-check.d.ts.map +1 -1
  119. package/dist/setup-check.js +70 -3
  120. package/dist/setup-check.js.map +1 -1
  121. package/dist/steady-log.d.ts +48 -0
  122. package/dist/steady-log.d.ts.map +1 -0
  123. package/dist/steady-log.js +100 -0
  124. package/dist/steady-log.js.map +1 -0
  125. package/dist/verify-cmd.d.ts +0 -2
  126. package/dist/verify-cmd.d.ts.map +1 -1
  127. package/dist/verify-cmd.js +0 -5
  128. package/dist/verify-cmd.js.map +1 -1
  129. package/dist/workspace-builds.d.ts +153 -0
  130. package/dist/workspace-builds.d.ts.map +1 -0
  131. package/dist/workspace-builds.js +347 -0
  132. package/dist/workspace-builds.js.map +1 -0
  133. package/dist/workspace-quarantine.d.ts +36 -2
  134. package/dist/workspace-quarantine.d.ts.map +1 -1
  135. package/dist/workspace-quarantine.js +53 -0
  136. package/dist/workspace-quarantine.js.map +1 -1
  137. package/dist/workspace.d.ts.map +1 -1
  138. package/dist/workspace.js +11 -3
  139. package/dist/workspace.js.map +1 -1
  140. package/package.json +2 -2
  141. package/win/contained-node.cjs +110 -1
  142. package/dist/.src-hash +0 -1
@@ -14,11 +14,27 @@ import type { GoalGapOutcome } from './goal-gap';
14
14
  * stays in the suite as the regression guard. The pull request and the ticket
15
15
  * say "reproduced: <test>, failed before, passes now".
16
16
  *
17
- * When the bug cannot be shown, Looply asks ONE precise question on the ticket
18
- * (which page or table, what was clicked, what was seen) before spending any
19
- * fix attempt. That is a genuine question about the work. It asks at most once:
20
- * a goal that already carries the person's answer goes on to fix without a
21
- * reproduction rather than asking again.
17
+ * 🔴 WHEN THE BUG CANNOT BE SHOWN, LOOPLY GOES ON — IT DOES NOT STOP TO ASK (2026-11-16).
18
+ *
19
+ * It used to ask ONE question on the ticket before spending any fix attempt, whenever the test writer could not
20
+ * tell exactly where the bug was, or its test passed on the current code. Read back over three weeks, those
21
+ * questions were "What did you expect manual mode to do differently?" (TAB-B-101), "What went wrong with the All
22
+ * Payments refund, or is the request just to remove it?" (TAB-B-105), "Which part of the Risk Chamber screen was
23
+ * unclear?" (RBB-B-251, asked twice) — each on a ticket a colleague would simply have had a go at, and each left
24
+ * the ticket waiting days for its reporter. The owner's bar is that a ticket pasted into a chat gets fixed nine
25
+ * times in ten; a question before the first attempt is the opposite of that.
26
+ *
27
+ * - THE REPORT CAN BE READ MORE THAN ONE WAY: the test writer says which reading it would act on (`assume`), and
28
+ * the work goes on to that reading. It travels with the goal's words to the plan, the rounds and the goal check,
29
+ * and the goal check repeats it on the ticket ("Looply read the request as … — reply if you meant something
30
+ * else"), so the reporter corrects it in one reply instead of answering a question first.
31
+ * - THE TEST PASSES ON THE CURRENT CODE: the bug did not show there. It may already be fixed, or lie where the
32
+ * test did not look. The plan is told exactly that and finds out which; "already fixed" then ends as its own
33
+ * checked answer (`goal-already-met.ts`), not as a question.
34
+ *
35
+ * A question is still asked, once, in the one case nothing else can cover: the test writer could form NO reading —
36
+ * the report breaks off mid-sentence, or names nothing it can find in this repository. A goal that already carries
37
+ * the person's answer never asks again.
22
38
  *
23
39
  * WHAT IS NEVER A REASON TO ASK. A command that could not run (a missing tool,
24
40
  * a sandbox denial, a timeout), an agent that failed, or a repository with no
@@ -55,9 +71,12 @@ export type ReproAnswer = {
55
71
  file: string;
56
72
  test: string;
57
73
  command: string;
58
- } | {
74
+ }
75
+ /** `assume`: the reading the test writer would act on. With it, nothing is asked: the work goes on to that reading. */
76
+ | {
59
77
  kind: 'question';
60
78
  question: string;
79
+ assume?: string;
61
80
  } | {
62
81
  kind: 'skip';
63
82
  because: string;
@@ -79,19 +98,64 @@ export type RunJudgement = {
79
98
  } | {
80
99
  verdict: 'green';
81
100
  }
82
- /** It did not run the test: a timeout, a runner that could not start, or a failure that never mentions it. */
101
+ /**
102
+ * It did not run the test: a timeout, a runner that could not start, or a failure that never mentions it.
103
+ * `service` is set when what was missing is a service the test suite needs and the sandbox cannot provide.
104
+ */
83
105
  | {
84
106
  verdict: 'not-run';
85
107
  because: string;
108
+ service?: string;
86
109
  };
110
+ /** A service a test suite needed and Looply's sandbox could not give it. */
111
+ export interface MissingService {
112
+ /** What it is, as a person would say it: "a PostgreSQL database". */
113
+ service: string;
114
+ /** Why it could not be had here, in one plain clause. */
115
+ detail: string;
116
+ }
117
+ /**
118
+ * 🔴 A TEST SUITE THAT NEEDS A SERVICE THIS SANDBOX DOES NOT PROVIDE.
119
+ *
120
+ * Measured 2026-11-16 in a real gate container (`network: 'none'`): a server on 127.0.0.1 and a client in
121
+ * the same sandbox, even in another process, talk normally; an outbound connection is refused (EACCES).
122
+ * So a database the suite starts for itself would be reachable — but PostgreSQL cannot start: on Windows
123
+ * it emulates signals through a named pipe, `\\.\pipe\pgsignal_<pid>`, and an AppContainer may create
124
+ * pipes only under `\\.\pipe\LOCAL\`. `initdb` retries and gets through; the server itself stops with
125
+ * "FATAL: could not create signal listener pipe … error code 5", and Tabsy's jest `globalSetup`
126
+ * (embedded-postgres) then waits for a server that is gone until the step's time runs out.
127
+ *
128
+ * That run is not the bug failing and not "no tests": it is the machine missing something the tests
129
+ * need. It gets its own words, so the plan and the goal check are told the change is judged without
130
+ * running these tests, rather than spending plans on a test that cannot start here. Returns null when
131
+ * the output shows no such thing.
132
+ */
133
+ export declare function missingService(output: string): MissingService | null;
134
+ /** The plain sentence for a run that needed a missing service: the change is not what failed. */
135
+ export declare function missingServiceSentence(m: MissingService): string;
136
+ /**
137
+ * 🔴 A RUN THAT RAN NO TEST (TAB-B-66, -86, -91, -95, -100; 2026-10-18 → 11-11).
138
+ *
139
+ * Inside the sandbox Tabsy's jest could not see its own test roots and printed
140
+ * "No tests found, exiting with code 1 … Pattern: test\\pay-at-table\\x.spec.ts - 0 matches".
141
+ * That output names the test file, so it was judged RED: "reproduced" on the
142
+ * base tree, and "still fails" at every delivered tree after the fix was in —
143
+ * six goals re-planned to the limit over a test that never ran once. A runner
144
+ * saying it found or ran nothing is the machine's problem, never the bug's:
145
+ * neither red nor green. Returns what the runner said, or null.
146
+ */
147
+ export declare function ranNoTests(output: string): string | null;
87
148
  /**
88
149
  * What one run of the test says. RED needs more than a non-zero exit: the
89
150
  * output must name the test or its file, or the failure could be a missing
90
151
  * tool or a syntax error elsewhere — a red that shows nothing about the bug.
152
+ * A run that ran no test at all is neither red nor green (`ranNoTests`).
91
153
  */
92
154
  export declare function judgeRun(result: CommandResult, repro: {
93
155
  test: string;
94
156
  file: string;
157
+ }, opts?: {
158
+ ranHereBefore?: boolean;
95
159
  }): RunJudgement;
96
160
  export interface ReproRun extends ReproductionRun {
97
161
  /** The end of the run's output, for a person reading the record. */
@@ -104,13 +168,24 @@ export interface ReproRecord {
104
168
  at: string;
105
169
  /**
106
170
  * reproduced — the test ran red on the base tree; the fix must turn it green
107
- * question — the bug did not show; a person is asked before any fix
108
- * not-reproduced — the bug did not show, the person already answered once; fixing without one
171
+ * question — no reading of the report was possible; a person is asked before any fix (rare)
172
+ * not-reproduced — the bug was not shown, and the work goes on without a reproduction: on a stated reading of
173
+ * the report (`assumed`), because the test passed on the current code (`passedOnBase`), or
174
+ * because the person already answered once
109
175
  * skipped — no reproduction could be attempted (the machine's problem, not the person's)
110
176
  */
111
177
  outcome: 'reproduced' | 'question' | 'not-reproduced' | 'skipped';
112
178
  because?: string;
179
+ /**
180
+ * Set on a `skipped` record when the test could not run because the suite needs a service the sandbox
181
+ * cannot provide ("a PostgreSQL database"). The plan and the goal check are told so (`reproductionBrief`).
182
+ */
183
+ needs?: string;
113
184
  question?: string;
185
+ /** The reading of the report the work goes on to, when it allowed more than one (see the header). */
186
+ assumed?: string;
187
+ /** The test written from the report passed on the base tree: already fixed, or the bug lies where it did not look. */
188
+ passedOnBase?: true;
114
189
  test?: string;
115
190
  file?: string;
116
191
  command?: string;
@@ -175,6 +250,11 @@ export interface ReproInput {
175
250
  * never reset — that work is somebody's).
176
251
  */
177
252
  export declare function reproduceBug(input: ReproInput, deps: ReproDeps): Promise<ReproRecord>;
253
+ /**
254
+ * What a bug that was NOT shown adds to the goal's words: the reading the work goes on to, or that a test written from
255
+ * the report already passes. '' for anything else (including a record written before these fields existed).
256
+ */
257
+ export declare function unreproducedBrief(r: ReproRecord | null): string;
178
258
  /** The block a reproduced bug adds to the goal's words, or '' for any other outcome. */
179
259
  export declare function reproductionBrief(r: ReproRecord | null): string;
180
260
  /** The goal's words with the reproduction attached, for the plan, the goal check and the rounds. */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AAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;CAClC,GACA,OAAO,CAAC,cAAc,CAAC,CAmCzB;AAYD,sGAAsG;AACtG,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,kBAAkB,GAAG,IAAI,CAOnF;AAID,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAS3E;AAYD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,OAAO,KAAa,GAC5B,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyBxD"}
package/dist/bug-repro.js CHANGED
@@ -6,8 +6,12 @@ exports.ticketAttachments = ticketAttachments;
6
6
  exports.ticketWasAnswered = ticketWasAnswered;
7
7
  exports.buildReproPrompt = buildReproPrompt;
8
8
  exports.extractReproAnswer = extractReproAnswer;
9
+ exports.missingService = missingService;
10
+ exports.missingServiceSentence = missingServiceSentence;
11
+ exports.ranNoTests = ranNoTests;
9
12
  exports.judgeRun = judgeRun;
10
13
  exports.reproduceBug = reproduceBug;
14
+ exports.unreproducedBrief = unreproducedBrief;
11
15
  exports.reproductionBrief = reproductionBrief;
12
16
  exports.withReproduction = withReproduction;
13
17
  exports.reproQuestion = reproQuestion;
@@ -31,11 +35,27 @@ const agent_envelope_1 = require("./agent-envelope");
31
35
  * stays in the suite as the regression guard. The pull request and the ticket
32
36
  * say "reproduced: <test>, failed before, passes now".
33
37
  *
34
- * When the bug cannot be shown, Looply asks ONE precise question on the ticket
35
- * (which page or table, what was clicked, what was seen) before spending any
36
- * fix attempt. That is a genuine question about the work. It asks at most once:
37
- * a goal that already carries the person's answer goes on to fix without a
38
- * reproduction rather than asking again.
38
+ * 🔴 WHEN THE BUG CANNOT BE SHOWN, LOOPLY GOES ON — IT DOES NOT STOP TO ASK (2026-11-16).
39
+ *
40
+ * It used to ask ONE question on the ticket before spending any fix attempt, whenever the test writer could not
41
+ * tell exactly where the bug was, or its test passed on the current code. Read back over three weeks, those
42
+ * questions were "What did you expect manual mode to do differently?" (TAB-B-101), "What went wrong with the All
43
+ * Payments refund, or is the request just to remove it?" (TAB-B-105), "Which part of the Risk Chamber screen was
44
+ * unclear?" (RBB-B-251, asked twice) — each on a ticket a colleague would simply have had a go at, and each left
45
+ * the ticket waiting days for its reporter. The owner's bar is that a ticket pasted into a chat gets fixed nine
46
+ * times in ten; a question before the first attempt is the opposite of that.
47
+ *
48
+ * - THE REPORT CAN BE READ MORE THAN ONE WAY: the test writer says which reading it would act on (`assume`), and
49
+ * the work goes on to that reading. It travels with the goal's words to the plan, the rounds and the goal check,
50
+ * and the goal check repeats it on the ticket ("Looply read the request as … — reply if you meant something
51
+ * else"), so the reporter corrects it in one reply instead of answering a question first.
52
+ * - THE TEST PASSES ON THE CURRENT CODE: the bug did not show there. It may already be fixed, or lie where the
53
+ * test did not look. The plan is told exactly that and finds out which; "already fixed" then ends as its own
54
+ * checked answer (`goal-already-met.ts`), not as a question.
55
+ *
56
+ * A question is still asked, once, in the one case nothing else can cover: the test writer could form NO reading —
57
+ * the report breaks off mid-sentence, or names nothing it can find in this repository. A goal that already carries
58
+ * the person's answer never asks again.
39
59
  *
40
60
  * WHAT IS NEVER A REASON TO ASK. A command that could not run (a missing tool,
41
61
  * a sandbox denial, a timeout), an agent that failed, or a repository with no
@@ -58,6 +78,8 @@ exports.TICKET_FILES_DIR = '.looply-ticket';
58
78
  const MAX_ATTACHMENTS = 4;
59
79
  const MAX_ATTACHMENT_BYTES = 5 * 1024 * 1024;
60
80
  const MAX_QUESTION = 200;
81
+ /** The reading the test writer would act on, when the report allows more than one. One sentence for the ticket. */
82
+ const MAX_ASSUMED = 300;
61
83
  /** The question asked when the bug did not show and the agent did not word a better one. */
62
84
  exports.DEFAULT_REPRO_QUESTION = "I couldn't make this bug happen. Which page or table is it on, what exactly did you click or enter, and what did you see instead of what you expected?";
63
85
  // ── reading the goal's words ──
@@ -119,8 +141,13 @@ function buildReproPrompt(input) {
119
141
  '',
120
142
  'ANSWER with one JSON object on a single line and nothing after it, one of:',
121
143
  '{"test":{"file":"<repository path of the test file>","name":"<the test name as written>","command":"<runs only this test>"}}',
122
- '{"question":"<one short question for the person who reported it>"} — only when you cannot tell WHERE the bug is',
123
- ' or WHAT goes wrong (for example which page or table, what they clicked, what they saw). Under 200 characters.',
144
+ '{"question":"<what is unclear, as one short question>","assume":"<the reading you would act on>"} — only when',
145
+ ' you cannot tell WHERE the bug is or WHAT goes wrong well enough to write a test. ALWAYS give "assume": the most',
146
+ ' reasonable reading of the report, as one plain sentence saying where and what (for example "the Refund button',
147
+ ' on the All Payments page can be pressed twice for the same payment"). Looply then works to that reading and',
148
+ ' tells the reporter, who can correct it in one reply — nobody is made to wait for an answer first. Leave',
149
+ ' "assume" out ONLY when no reading is possible: the report breaks off mid-sentence, or names nothing you can',
150
+ ' find in this repository at all. Each under 200 characters.',
124
151
  '{"skip":"<why>"} — when this bug cannot be shown by a test in this repository (for example it is only visual).',
125
152
  ].join('\n');
126
153
  }
@@ -146,13 +173,17 @@ function extractReproAnswer(transcript) {
146
173
  const file = typeof r['file'] === 'string' ? r['file'].trim().replace(/\\/g, '/') : '';
147
174
  const name = typeof r['name'] === 'string' ? r['name'].trim() : '';
148
175
  const command = typeof r['command'] === 'string' ? r['command'].trim() : '';
149
- if (file && name && command && !file.startsWith('/') && !/^[A-Za-z]:/.test(file) && !file.split('/').includes('..')) {
176
+ // A path longer than the delivery report allows (core `validateReproduction`) is no answer: sent on, it would
177
+ // have the server refuse every report of this goal's delivery.
178
+ if (file && file.length <= 300 && name && command && !file.startsWith('/') && !/^[A-Za-z]:/.test(file) && !file.split('/').includes('..')) {
150
179
  return { kind: 'test', file, test: name.slice(0, 200), command: command.slice(0, 400) };
151
180
  }
152
181
  continue;
153
182
  }
154
183
  if (typeof o['question'] === 'string' && o['question'].trim()) {
155
- return { kind: 'question', question: oneLine(o['question']).slice(0, MAX_QUESTION) };
184
+ const question = oneLine(o['question']).slice(0, MAX_QUESTION);
185
+ const assume = typeof o['assume'] === 'string' ? oneLine(o['assume']).slice(0, MAX_ASSUMED) : '';
186
+ return assume === '' ? { kind: 'question', question } : { kind: 'question', question, assume };
156
187
  }
157
188
  if (typeof o['skip'] === 'string')
158
189
  return { kind: 'skip', because: oneLine(o['skip']).slice(0, 300) || 'no reason given' };
@@ -162,16 +193,131 @@ function extractReproAnswer(transcript) {
162
193
  function oneLine(s) {
163
194
  return s.replace(/\s+/g, ' ').trim();
164
195
  }
196
+ /** Well-known ports, for naming the server a refused connection was meant for. */
197
+ const SERVICE_PORTS = {
198
+ '5432': 'a PostgreSQL database',
199
+ '3306': 'a MySQL database',
200
+ '1433': 'a SQL Server database',
201
+ '27017': 'a MongoDB database',
202
+ '6379': 'a Redis server',
203
+ '5672': 'a RabbitMQ server',
204
+ '9200': 'an Elasticsearch server',
205
+ };
206
+ /**
207
+ * 🔴 A TEST SUITE THAT NEEDS A SERVICE THIS SANDBOX DOES NOT PROVIDE.
208
+ *
209
+ * Measured 2026-11-16 in a real gate container (`network: 'none'`): a server on 127.0.0.1 and a client in
210
+ * the same sandbox, even in another process, talk normally; an outbound connection is refused (EACCES).
211
+ * So a database the suite starts for itself would be reachable — but PostgreSQL cannot start: on Windows
212
+ * it emulates signals through a named pipe, `\\.\pipe\pgsignal_<pid>`, and an AppContainer may create
213
+ * pipes only under `\\.\pipe\LOCAL\`. `initdb` retries and gets through; the server itself stops with
214
+ * "FATAL: could not create signal listener pipe … error code 5", and Tabsy's jest `globalSetup`
215
+ * (embedded-postgres) then waits for a server that is gone until the step's time runs out.
216
+ *
217
+ * That run is not the bug failing and not "no tests": it is the machine missing something the tests
218
+ * need. It gets its own words, so the plan and the goal check are told the change is judged without
219
+ * running these tests, rather than spending plans on a test that cannot start here. Returns null when
220
+ * the output shows no such thing.
221
+ */
222
+ function missingService(output) {
223
+ const out = output.replace(/\x1b\[[0-9;]*m/g, '');
224
+ if (/could not create signal listener pipe/i.test(out)) {
225
+ return {
226
+ service: 'a PostgreSQL database',
227
+ detail: "the tests start their own PostgreSQL, and PostgreSQL cannot run inside Looply's sandbox on Windows",
228
+ };
229
+ }
230
+ if (/Could not find a working container runtime strategy|Cannot connect to the Docker daemon|docker_engine/i.test(out)) {
231
+ return { service: 'Docker', detail: "the tests start containers, and there is no Docker inside Looply's sandbox" };
232
+ }
233
+ // A refused connection to a database's port, on this PC or elsewhere, from a sandbox with no network.
234
+ for (const refused of out.matchAll(/\bconnect (?:ECONNREFUSED|EACCES) (\S+):(\d+)\b/g)) {
235
+ const port = refused[2];
236
+ const named = SERVICE_PORTS[port];
237
+ if (named !== undefined) {
238
+ const local = /^(127\.|::1|\[::1\]|localhost)/i.test(refused[1]);
239
+ return {
240
+ service: named,
241
+ detail: local
242
+ ? `nothing inside Looply's sandbox answers on port ${port}, and the sandbox cannot reach one running elsewhere on this PC`
243
+ : "Looply's sandbox has no network, so the tests cannot reach the server they connect to",
244
+ };
245
+ }
246
+ }
247
+ const prisma = /Can't reach database server at [`'"]?[^`'"\s:]+[`'"]?:[`'"]?(\d+)/.exec(out);
248
+ if (prisma !== null) {
249
+ return {
250
+ service: SERVICE_PORTS[prisma[1]] ?? 'a database server',
251
+ detail: "the tests connect to a database server, and Looply's sandbox cannot reach one",
252
+ };
253
+ }
254
+ return null;
255
+ }
256
+ /** The plain sentence for a run that needed a missing service: the change is not what failed. */
257
+ function missingServiceSentence(m) {
258
+ return `this repository's tests need ${m.service}, which Looply cannot start in its sandbox here (${m.detail})`;
259
+ }
260
+ /**
261
+ * 🔴 A RUN THAT RAN NO TEST (TAB-B-66, -86, -91, -95, -100; 2026-10-18 → 11-11).
262
+ *
263
+ * Inside the sandbox Tabsy's jest could not see its own test roots and printed
264
+ * "No tests found, exiting with code 1 … Pattern: test\\pay-at-table\\x.spec.ts - 0 matches".
265
+ * That output names the test file, so it was judged RED: "reproduced" on the
266
+ * base tree, and "still fails" at every delivered tree after the fix was in —
267
+ * six goals re-planned to the limit over a test that never ran once. A runner
268
+ * saying it found or ran nothing is the machine's problem, never the bug's:
269
+ * neither red nor green. Returns what the runner said, or null.
270
+ */
271
+ function ranNoTests(output) {
272
+ const out = output.replace(/\x1b\[[0-9;]*m/g, '');
273
+ if (/\bNo tests found\b/i.test(out))
274
+ return 'the test runner found no tests to run';
275
+ if (/\bNo test (?:files|suites?) found\b/i.test(out))
276
+ return 'the test runner found no test files to run';
277
+ // jest / vitest summaries in which every test was skipped (a `-t` name that matched nothing).
278
+ const summary = /^\s*Tests:?\s+(.*\btotal\b.*|.*\bskipped\b.*)$/im.exec(out)?.[1];
279
+ if (summary !== undefined && !/\b(passed|failed)\b/i.test(summary) && /\bskipped\b|\b0 total\b/i.test(summary)) {
280
+ return 'the test runner skipped every test (the test name matched none)';
281
+ }
282
+ if (/^\s*0 passing\b/m.test(out) && !/^\s*\d+ failing\b/m.test(out))
283
+ return 'the test runner ran no tests';
284
+ return null;
285
+ }
165
286
  /**
166
287
  * What one run of the test says. RED needs more than a non-zero exit: the
167
288
  * output must name the test or its file, or the failure could be a missing
168
289
  * tool or a syntax error elsewhere — a red that shows nothing about the bug.
290
+ * A run that ran no test at all is neither red nor green (`ranNoTests`).
169
291
  */
170
- function judgeRun(result, repro) {
292
+ function judgeRun(result, repro, opts = {}) {
293
+ /**
294
+ * 🔴 A TEST THAT ALREADY RAN ON THIS MACHINE IS NOT EXCUSED BY A SERVICE MESSAGE (review of 0.5.53). The check of a
295
+ * delivered tree re-runs a test whose red run on the base was real — the suite started, the test ran. If it fails
296
+ * now and its output mentions a refused connection, that is the FIX's doing (it added a call to something that is
297
+ * not there) or a client's log line beside a real failure: red, a gap the next plan closes — never "could not run,
298
+ * not blocking". Only a first run on the base, where nothing is yet known to start, reads the message as "this
299
+ * suite needs a service the sandbox cannot give".
300
+ */
301
+ const names = (out) => {
302
+ const f = (0, node_path_1.basename)(repro.file);
303
+ const st = f.replace(/\.[^.]+$/, '');
304
+ return out.includes(repro.test) || out.includes(f) || (st.length >= 4 && out.includes(st));
305
+ };
306
+ const provenRunner = opts.ranHereBefore === true && !result.timedOut && result.unavailable !== true && names(result.output ?? '');
307
+ // Before the timeout: a suite waiting for a database that died at startup runs out of time, and its
308
+ // output says why (`missingService`). A green run is green whatever it logged on the way.
309
+ if (!(result.ok && !result.timedOut) && !provenRunner) {
310
+ const missing = missingService(result.output ?? '');
311
+ if (missing !== null)
312
+ return { verdict: 'not-run', because: missingServiceSentence(missing), service: missing.service };
313
+ }
171
314
  if (result.timedOut)
172
315
  return { verdict: 'not-run', because: 'the test run timed out' };
173
316
  if (result.unavailable === true)
174
317
  return { verdict: 'not-run', because: 'the test could not be started on this machine' };
318
+ const none = ranNoTests(result.output ?? '');
319
+ if (none !== null)
320
+ return { verdict: 'not-run', because: `${none} (exit ${result.exitCode ?? 'unknown'})` };
175
321
  if (result.ok)
176
322
  return { verdict: 'green' };
177
323
  const out = result.output ?? '';
@@ -185,6 +331,17 @@ function tail(s, n = 1500) {
185
331
  const t = (s ?? '').trim();
186
332
  return t.length > n ? `…${t.slice(-n)}` : t;
187
333
  }
334
+ /**
335
+ * A record written before `ranNoTests` existed may say "reproduced" about a run that ran no test.
336
+ * Read back, it is what it always was — no reproduction — so no later check gates on it and no
337
+ * pull request claims "failed before". The file itself is left as it was written.
338
+ */
339
+ function standing(r) {
340
+ const none = r.outcome === 'reproduced' && r.failedBefore !== undefined ? ranNoTests(r.failedBefore.tail ?? '') : null;
341
+ if (none === null)
342
+ return r;
343
+ return { ...r, outcome: 'skipped', because: `the reproduction test never ran on the base tree: ${none}` };
344
+ }
188
345
  /** One file per goal version, under the PROJECT's state, so every checkout of the project reads the same one. */
189
346
  class ReproStore {
190
347
  stateDir;
@@ -200,7 +357,7 @@ class ReproStore {
200
357
  read(goalId, goalVersion) {
201
358
  try {
202
359
  const r = JSON.parse((0, node_fs_1.readFileSync)(this.path(goalId, goalVersion), 'utf8'));
203
- return r && r.schema === 1 && r.goalId === goalId ? r : null;
360
+ return r && r.schema === 1 && r.goalId === goalId ? standing(r) : null;
204
361
  }
205
362
  catch {
206
363
  return null;
@@ -292,8 +449,20 @@ async function reproduceBug(input, deps) {
292
449
  return skipped('the agent gave no reproduction answer');
293
450
  if (answer.kind === 'skip')
294
451
  return skipped(`no test can show this bug here: ${answer.because}`);
295
- if (answer.kind === 'question')
452
+ if (answer.kind === 'question') {
453
+ // A reading to act on: go on to it, and say so — never a question before the first attempt.
454
+ if (answer.assume !== undefined && !answered) {
455
+ deps.log(`repro : the report can be read more than one way — going on with this reading: ${answer.assume}`);
456
+ return {
457
+ ...base,
458
+ outcome: 'not-reproduced',
459
+ because: 'the report did not say exactly where the bug is, so this is fixed without a reproduction, on a stated reading of it',
460
+ question: answer.question,
461
+ assumed: answer.assume,
462
+ };
463
+ }
296
464
  return ask(answer.question, 'the test writer could not tell where the bug is');
465
+ }
297
466
  const content = deps.readFile(answer.file);
298
467
  if (content === null)
299
468
  return skipped(`the reproduction test file ${answer.file} was not written`);
@@ -317,11 +486,19 @@ async function reproduceBug(input, deps) {
317
486
  return { ...base, outcome: 'reproduced', ...kept, failedBefore: run, passesNow: null };
318
487
  }
319
488
  if (judged.verdict === 'green') {
489
+ // Not a question either: already fixed, or somewhere this test did not look. The plan finds out which.
490
+ deps.log(`repro : "${answer.test}" passes on the current code — the bug did not show there; going on without a reproduction`);
320
491
  return {
321
- ...ask(exports.DEFAULT_REPRO_QUESTION, `the test "${answer.test}" passes on the current code, so the bug did not show`),
492
+ ...base,
493
+ outcome: 'not-reproduced',
494
+ because: `the test "${answer.test}" passes on the current code, so the bug did not show there`,
495
+ passedOnBase: true,
322
496
  ...kept,
323
497
  };
324
498
  }
499
+ if (judged.service !== undefined) {
500
+ return { ...skipped(`the reproduction test was written but cannot run here: ${judged.because}`), needs: judged.service, ...kept };
501
+ }
325
502
  return { ...skipped(`the reproduction test could not be run: ${judged.because}`), ...kept };
326
503
  }
327
504
  catch (e) {
@@ -335,8 +512,43 @@ async function reproduceBug(input, deps) {
335
512
  }
336
513
  }
337
514
  // ── what the plan and every round are told ──
515
+ /**
516
+ * What a bug that was NOT shown adds to the goal's words: the reading the work goes on to, or that a test written from
517
+ * the report already passes. '' for anything else (including a record written before these fields existed).
518
+ */
519
+ function unreproducedBrief(r) {
520
+ if (r === null || r.outcome !== 'not-reproduced')
521
+ return '';
522
+ if (r.assumed !== undefined && r.assumed !== '') {
523
+ return [
524
+ '',
525
+ '',
526
+ 'THIS REPORT CAN BE READ MORE THAN ONE WAY, AND NOBODY WAS ASKED FIRST. Looply is working to this reading of it:',
527
+ `- ${r.assumed}`,
528
+ ...(r.question === undefined || r.question === '' ? [] : [`- (what was unclear: ${r.question})`]),
529
+ 'Work to that reading. When the work is checked, the answer must say it was assumed ("assumed"), in these words,',
530
+ 'so the person who reported it can correct it in one reply.',
531
+ ].join('\n');
532
+ }
533
+ if (r.passedOnBase === true && r.test) {
534
+ return [
535
+ '',
536
+ '',
537
+ 'A TEST WRITTEN FROM THIS REPORT PASSES ON THE CURRENT CODE, so the bug did not show there:',
538
+ `- test "${r.test}"${r.file ? ` in ${r.file}` : ''} (not kept; the tree was reset)`,
539
+ 'Either the bug is already fixed, or it lies somewhere that test did not look. Find out which BEFORE changing',
540
+ 'anything: read how the report\'s case is handled now. If it is already fixed, change nothing — say where it is',
541
+ 'handled. If it is not, fix it where it really is.',
542
+ ].join('\n');
543
+ }
544
+ return '';
545
+ }
338
546
  /** The block a reproduced bug adds to the goal's words, or '' for any other outcome. */
339
547
  function reproductionBrief(r) {
548
+ if (r !== null && r.outcome === 'not-reproduced')
549
+ return unreproducedBrief(r);
550
+ if (r !== null && r.outcome === 'skipped' && r.needs !== undefined)
551
+ return missingServiceBrief(r);
340
552
  if (r === null || r.outcome !== 'reproduced' || !r.test || !r.file || !r.command)
341
553
  return '';
342
554
  const head = [
@@ -361,6 +573,21 @@ function reproductionBrief(r) {
361
573
  }
362
574
  return `${head}${body}`;
363
575
  }
576
+ /**
577
+ * 🔴 THE TESTS CANNOT RUN HERE, SAID TO THE PLAN, THE ROUNDS AND THE GOAL CHECK. Without it, Tabsy's goals
578
+ * were judged against a test that could never start in the sandbox, and re-planned until the plan limit.
579
+ * With it, the work is judged on the change itself, and nobody tries to bring a database into the sandbox.
580
+ */
581
+ function missingServiceBrief(r) {
582
+ return [
583
+ '',
584
+ '',
585
+ `THIS REPOSITORY'S TESTS CANNOT RUN ON THIS MACHINE: they need ${r.needs}, which Looply cannot start in its sandbox.`,
586
+ ...(r.test && r.file ? [`- Looply wrote the test "${r.test}" in ${r.file} to show the bug; it could not be run here.`] : []),
587
+ `- Make the change. Do not try to install, start or configure ${r.needs}, and do not change the test setup to get round it.`,
588
+ '- Judge the work by the change itself and the checks that can run; a test that cannot start here is not a gap in the work.',
589
+ ].join('\n');
590
+ }
364
591
  /** The goal's words with the reproduction attached, for the plan, the goal check and the rounds. */
365
592
  function withReproduction(goalText, r) {
366
593
  return `${goalText}${reproductionBrief(r)}`;
@@ -388,7 +615,8 @@ async function checkReproGreen(r, deps) {
388
615
  try {
389
616
  const result = await deps.run(r.command, exports.REPRO_RUN_TIMEOUT_MS);
390
617
  const run = { sha, exitCode: result.exitCode ?? null, at: deps.now().toISOString(), tail: tail(result.output) };
391
- const j = judgeRun(result, { test: r.test, file: r.file });
618
+ // Only a record that says the test ran red here is checked (`evaluateWithReproduction`): its runner is proven.
619
+ const j = judgeRun(result, { test: r.test, file: r.file }, { ranHereBefore: r.outcome === 'reproduced' });
392
620
  if (j.verdict === 'green')
393
621
  return { state: 'green', run };
394
622
  if (j.verdict === 'red')