Skip to content

Commit 671d221

Browse files
Stop two tests reporting policy as breakage
Both predate this session's pipeline work — confirmed by running them at the pre-session checkpoint — and both were asserting against premises the code had deliberately moved past. TestAnInterruptedStallIsStillAStall asserted that an identical failure three times escalates, using "completeness" as its gate. completeness is in escalationWouldNotHelp: it asks for text the run has already been given in full, a dearer model cannot supply it any better, and record declines to escalate on it whatever the tally. It now uses a gate with no exemption, and fails loudly if that gate ever acquires one. This is the second test found today asserting a general rule through a gate that is exempt from it. TestAnUndocumentedMainIsAskedForRatherThanOnlyReported looked for a bare "main" among the reported gaps. Gaps have been qualified with their file since CL-20260803-141, because a generated workspace holds a stub main.go beside the real one and the unqualified name describes both — so the test read the qualification as the gate having stopped asking at all. Change-Log: CL-20260803-166 Dev-Log: DL-20260803-176 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent bf60014 commit 671d221

4 files changed

Lines changed: 77 additions & 10 deletions

File tree

CHANGELOG

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,36 @@ Dev-Log:
5050

5151
Entries
5252
-------
53-
Change-ID: CL-20260803-165
53+
Change-ID: CL-20260803-166
5454
Commit: pending
5555
Date: 2026-08-04
56+
Type: Fix -- two long-failing tests were asserting against premises the code had
57+
deliberately moved past
58+
Request-or-TODO: Regression sweep after the rung 16 work
59+
Outcome: Both predate this session's pipeline work -- checked by running them at
60+
the pre-session checkpoint -- and both were reporting a deliberate design
61+
decision as a broken mechanism. TestAnInterruptedStallIsStillAStall asserted
62+
that an identical failure three times escalates, using "completeness" as the
63+
gate; completeness is in escalationWouldNotHelp, because it asks for text the
64+
run has already been given in full and a dearer model cannot supply it any
65+
better, so record declines to escalate on it whatever the tally. It now uses a
66+
gate with no exemption and fails loudly if that gate ever acquires one -- the
67+
same shape as the fix to TestARunRepeatingItselfIsEscalated earlier today, and
68+
the second time this pattern has been found.
69+
TestAnUndocumentedMainIsAskedForRatherThanOnlyReported looked for a bare
70+
"main" in the reported gaps; gaps have been qualified with their file since
71+
CL-20260803-141, because a generated workspace holds a stub main.go beside the
72+
real one and the unqualified name describes both. It matches the qualified
73+
name now.
74+
Affected-behavior: None. Both changes are to tests.
75+
Compatibility-or-migration: None.
76+
Verification: Both pass. Both were confirmed failing at 5577f21, before any of
77+
this session's pipeline changes, so neither was caused by them.
78+
Dev-Log: DL-20260803-176
79+
80+
Change-ID: CL-20260803-165
81+
Commit: bf60014
82+
Date: 2026-08-04
5683
Type: Fix -- the fuzz stage named the case it could not handle and then did the
5784
one thing guaranteed to fail
5885
Request-or-TODO: Ladder rung 16

DEVLOG

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,27 @@ Next-safe-step:
2525

2626
Entries
2727
-------
28+
Dev-Log: DL-20260803-176
29+
Date: 2026-08-04
30+
Status: Committed as CL-20260803-166
31+
Change-ID: CL-20260803-166
32+
Request-or-TODO: Regression sweep
33+
Goal: Clear two failures without mistaking a policy for a bug
34+
Assumptions: None. Both were run against a clean checkout at 5577f21 first, to
35+
establish they were not caused by this session
36+
Decisions: Changed the tests, not the code, in both cases. The exemption for
37+
completeness is documented with a reason and the qualification of gap names
38+
was made deliberately to stop runs patching the wrong main.go; a test that
39+
disagrees with either is the thing that is out of date
40+
Files-or-schemas: internal/coordinator/agent_convergence_test.go,
41+
agent_refinable_test.go
42+
Validation: Both pass; the wider coordinator suite is unaffected
43+
Failures-or-discarded-approaches: None
44+
Known-limitations: This is the second stale test found asserting a general rule
45+
through a gate that has a specific exemption. Both now guard against the gate
46+
acquiring one, but nothing stops a third being written the same way
47+
Next-safe-step: Rung 17
48+
2849
Dev-Log: DL-20260803-175
2950
Date: 2026-08-04
3051
Status: Committed as CL-20260803-165

internal/coordinator/agent_convergence_test.go

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -355,15 +355,27 @@ func TestDecompositionTellsTheRunToStopTryingItInOnePiece(t *testing.T) {
355355
// stuck on one gate indefinitely as long as something else interrupted now and
356356
// then. Worse, the interruptions came from the malformed-turn recovery added
357357
// to make runs survive model slips: one repair quietly disabled another.
358+
//
359+
// The gate is deliberately not "completeness", which is what rung 5 actually
360+
// failed. completeness is in escalationWouldNotHelp: it asks for text the run
361+
// has already been given in full, so a dearer model cannot satisfy it any
362+
// better and record declines to escalate on it whatever the tally. Written
363+
// against completeness this asserted the general rule through a gate that is
364+
// exempt from it, and reported a deliberate policy as a broken counter.
358365
func TestAnInterruptedStallIsStillAStall(t *testing.T) {
359366
tracker := newConvergence(escalationSettings(3))
360-
const stuck = "1 function has no doc comment: main"
367+
const gate = "path-coverage"
368+
const stuck = "1 changed line is executed by nothing: main.go"
369+
if escalationWouldNotHelp[gate] || regressionProneGates[gate] {
370+
t.Fatalf("%s now has an exemption, so this case no longer exercises "+
371+
"the ordinary counting rule", gate)
372+
}
361373

362-
tracker.record("completeness", stuck, stuck)
363-
tracker.record("completeness", stuck, stuck)
364-
// An unrelated failure. Nothing was learned about the doc comment.
365-
tracker.record("assembly", "the loop refused a malformed turn", "")
366-
decision := tracker.record("completeness", stuck, stuck)
374+
tracker.record(gate, stuck, stuck)
375+
tracker.record(gate, stuck, stuck)
376+
// An unrelated failure. Nothing was learned about the uncovered line.
377+
tracker.record("model-turn", "the loop refused a malformed turn", "")
378+
decision := tracker.record(gate, stuck, stuck)
367379
if decision.Escalated == "" {
368380
t.Fatal("the third occurrence of an identical failure did not escalate " +
369381
"because an unrelated failure happened in between")

internal/coordinator/agent_refinable_test.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,22 @@ func TestAnUndocumentedMainIsAskedForRatherThanOnlyReported(t *testing.T) {
212212
if err != nil {
213213
t.Fatal(err)
214214
}
215+
// Matched on the qualified name, because that is what a gap is now called.
216+
// A bare "main" is ambiguous exactly where it matters most: a generated
217+
// workspace holds a stub main.go beside the real cmd/thing/main.go, so the
218+
// unqualified name describes two declarations and the run has to guess. The
219+
// assertion kept looking for the bare name and read the qualification as
220+
// the gate having stopped asking at all.
215221
asked := false
216222
for _, name := range gaps.UndocumentedAtoms {
217-
if name == "main" {
223+
if name == "main" || strings.HasSuffix(name, ":main") {
218224
asked = true
219225
}
220226
}
221227
if !asked {
222-
t.Error("the ledger reports an undocumented main and the gate never " +
223-
"asks for one, so no attempt can close it")
228+
t.Errorf("the ledger reports an undocumented main and the gate never "+
229+
"asks for one, so no attempt can close it: %v",
230+
gaps.UndocumentedAtoms)
224231
}
225232
if checkAtomDocumentation(worktree, newProducedFunctionCache(worktree)).Held {
226233
t.Error("the ledger accepts an undocumented main the gate asks for, " +

0 commit comments

Comments
 (0)