Commit af4033a
committed
fix: stacked-review round — 1 Critical, 3 High, 3 confirmed handle-shape defects (nexus-dhs30, asaod, ingey, at2ff sweep)
Six reviewers over 2b2ecd0..a7ef414, run AFTER those eight commits shipped —
which is how the Critical below reached develop and sat there. Every fix here
is mutation-verified: the guard is removed, the test fails, the guard is
restored.
CRITICAL — CI has been RED on develop for hours and nobody looked (nexus-dhs30)
a797dbd added `fetch-tags: true` to release.yml but NOT to ci.yml's `test`
job, which runs the full suite on every push from a shallow, tagless checkout.
The non-vacuity test I had just written (test_newest_published_engine_reads_
real_tags) therefore failed on EVERY push from a797dbd onward — four commits
landed on red. Each of those commit messages says "Full unit suite: N passed,
0 failed", true from a local full clone, and the CI result was never read.
Exactly the rot class the day was spent mechanizing against, one layer down:
the mechanization's own test was never validated in the shape it runs in.
- ci.yml `test` job gains fetch-tags: true.
- The test is SPLIT: a new hermetic test builds its own repo with known tags,
so the parse bug it exists to catch (parse_engine_version takes "0.1.56",
not "engine-service-v0.1.56") is caught in ANY environment, tags or not.
HIGH — the asaod 409 guard was half-applied, and the missed half is the
heavier path. `op.startsWith("/import/")` does NOT match "/import_batch" (no
slash after "import"). importTopicsBatch does the identical
insertInto(TOPICS, TOPICS.ID, ...).onConflict(TOPICS.ID) against the same
global BIGSERIAL PK, so the bulk ETL route — the 190k-row dogfood leg — kept
returning the opaque 500 the fix was cut to remove. Extracted isImportOp();
added a Testcontainers regression test that fails against the original guard.
NOT LIVE: engine-service-v0.1.56 is deployed with the half-applied guard.
HIGH x2 — `nx doctor` crashed where it was supposed to degrade, in the very
commit that existed to stop doctor misreporting health (nexus-ingey/k0luu).
_report_aspect_queue_service caught only httpx.HTTPError, but store
CONSTRUCTION resolves the endpoint and raises ServiceEndpointUnresolvableError
— a RuntimeError, not an httpx error. _run_trim_telemetry's service branch had
NO handling at all. A missing supervisor lease or absent NX_SERVICE_TOKEN thus
produced a traceback. The console twin written in the SAME commit caught
(httpx.HTTPError, RuntimeError) correctly; the doctor sites did not. Trim now
exits 2 with UNKNOWN rather than reporting a partial trim as complete.
THREE MORE at2ff INSTANCES, found by an independent sweep beyond the four
fixed in a23b2aa:
- db/migrations.py:2705 — an UPGRADE BLOCKER. t3_db._client made every
collection print "SKIPPED (AttributeError)", then a raw taxonomy.conn read
OUTSIDE the loop's except hard-failed, so `nx upgrade` reported "will retry
on next nx upgrade" for a retry that could never succeed. Both halves
fixed; the raw count is DELETED rather than guarded (it was a progress-line
nicety, and guarding it would have grown a census that may only shrink).
- db/t3_reidentify.py:145 — `nx t3 reidentify` errored on every collection.
- mcp/plan_cache_registry.py:62 — the staleness tier is DEAD in production
(HttpPlanLibrary has no .path, so mtime is always 0.0). DECLARED, not
faked: a real fix needs a server-side ETag. The docstring had called the
only production case an "edge case".
A THIRD TEST FOUND ENCODING A PHANTOM HANDLE SHAPE. tests/test_projection_
quality.py had its own `class _StubT3: self._client = client`, and
tests/mcp/test_remediate_tool.py stubbed a telemetry object with no
record_consent while calling it "the real service-mode shape" — but
HttpTelemetryStore has had record_consent since nexus-ng2sy. Three today
(cf. tests/test_catalog.py). Each made a permanently-dead branch look covered.
ALSO FIXED:
- nexus-xj744: HttpCatalogClient._db raised RuntimeError, violating the
guard contract that hasattr()/has_raw_access() depend on. Now
AttributeError, plus a NEW contract suite pinning all nine service-backed
stores so the next one cannot reintroduce it.
- nexus-huaef: the remediate version-skew branch could never fire. The
fail-closed contract itself was never at risk (record_consent raises via
_raise_for_status, and the generic except refuses), but the actionable
"upgrade the engine" diagnosis was dead. Now keyed on 404/405, with a 500
deliberately NOT misdiagnosed as skew.
- nexus-d4ac1: embed_migrate's two at2ff sites, fixed while still dead code.
- The ManagedServiceError branch of check_floor had ZERO coverage —
replacing it with `return 0` left all 14 tests green. Covered.
- NEXUS_PREV_RELEASE/NEXUS_PREV_ENGINE_TAG rotated to 6.18.0/v0.1.52. This
was a MISSED SCHEDULED TRIGGER, not new debt: the 6.18.0 record said
"rotate on next floor bump" and that bump was bfd3c25.
- M1 accepted risk recorded in code: the 409-vs-200 status is a cross-tenant
id-EXISTENCE oracle (global BIGSERIAL PK). Body and logs leak nothing
further. Enumeration surface left open — nexus-4fpbl (P3).
- Locale coupling on the RLS message match noted (non-English lc_messages
silently degrades every 409 back to 500).
The suite-runtime anomaly (1:03:13 vs ~13min) was diagnosed as machine
contention, NOT code — the routing tests run 43 tests in 2.1s and the tree
runs at normal throughput today. --durations=15 added to the invocation so the
next anomaly localizes itself instead of needing forensics.
Full unit suite: 13,432 passed, 0 failed (fresh service JAR).1 parent a7ef414 commit af4033a
17 files changed
Lines changed: 641 additions & 58 deletions
File tree
- .github/workflows
- service/src
- main/java/dev/nexus/service/http
- test/java/dev/nexus/service/http
- src/nexus
- catalog
- commands
- db
- mcp
- tests
- db
- e2e/migration-rehearsal
- mcp
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
88 | 98 | | |
89 | 99 | | |
90 | 100 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
191 | 199 | | |
192 | 200 | | |
193 | 201 | | |
| |||
Lines changed: 49 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
213 | 235 | | |
214 | 236 | | |
215 | 237 | | |
| |||
220 | 242 | | |
221 | 243 | | |
222 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
223 | 271 | | |
224 | 272 | | |
225 | 273 | | |
| |||
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
163 | 189 | | |
164 | 190 | | |
165 | 191 | | |
| |||
230 | 256 | | |
231 | 257 | | |
232 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
233 | 275 | | |
234 | 276 | | |
235 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
264 | 273 | | |
265 | | - | |
| 274 | + | |
266 | 275 | | |
267 | 276 | | |
268 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| 596 | + | |
| 597 | + | |
596 | 598 | | |
597 | 599 | | |
598 | | - | |
599 | | - | |
600 | | - | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
601 | 621 | | |
602 | 622 | | |
603 | 623 | | |
| |||
644 | 664 | | |
645 | 665 | | |
646 | 666 | | |
647 | | - | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
648 | 678 | | |
649 | 679 | | |
650 | 680 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
128 | 134 | | |
129 | 135 | | |
130 | 136 | | |
| |||
173 | 179 | | |
174 | 180 | | |
175 | 181 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
180 | 188 | | |
181 | 189 | | |
182 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2701 | 2701 | | |
2702 | 2702 | | |
2703 | 2703 | | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
2704 | 2712 | | |
2705 | | - | |
| 2713 | + | |
2706 | 2714 | | |
2707 | 2715 | | |
2708 | 2716 | | |
| |||
2743 | 2751 | | |
2744 | 2752 | | |
2745 | 2753 | | |
2746 | | - | |
2747 | | - | |
2748 | | - | |
2749 | | - | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
2750 | 2778 | | |
2751 | | - | |
2752 | | - | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
2753 | 2782 | | |
2754 | 2783 | | |
2755 | 2784 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
146 | 160 | | |
147 | 161 | | |
148 | 162 | | |
| |||
0 commit comments