Commit 640f91c
committed
fix(ci+compliance): ruff format + Dijkstra RED items (panel split, dead param)
CI went red on commit 21ba756 with ruff format check failing on 5 files
(ast_extractors.py, codebase_graph.py, workflow_graph_source_native_ast.py,
test_ap_bridge_enable_precedence.py, test_workflow_graph_source_native_ast.py).
`ruff format` applied — cosmetic only, no logic changes.
Dijkstra compliance audit (2026-04-24) flagged two RED items (block
merge per §10 High-stakes) that I introduced in the humanization chain:
**RED 1 — workflow_graph_panel.js at 579 LOC violated both global
§4.1 (500) and project (300) limits.** I added +141 LOC across 0135887
(humanization rows) and 21ba756 (ZPD raw-key bridge).
Split into two modules:
- `ui/unified/js/workflow_graph_panel.js` — framework primitives,
`buildSidePanel`, plain-description + heat + stage + technical-
details renderers. Exports `JUG._wfgPanelHelpers` for the renderer
module to consume. **362 LOC** (under the global 500-line cap;
above the project 300 cap — YELLOW, follow-up split planned).
- `ui/unified/js/workflow_graph_panel_renderers.js` — the ten
per-kind `render<Kind>` functions + dispatch table under
`JUG._wfgRenderers`. File and Discussion renderers additionally
split into `_render<Kind>Identity/Domains/Relationships/...` helpers
to stay under the project 40-line method rule. **332 LOC**.
Panel's `show()` now fetches the renderer via `rendererFor(kind)` which
delegates to `JUG._wfgRenderers.get(kind)`. Load order in
`unified-viz.html`: humanize → panel → panel_renderers, so the helper
registry + humanizer exist before the renderers are registered.
**RED 2 — dead `ctx` parameter.** `plainDescription(n, ctx)` in
humanize.js advertised graph-context lookup in its docstring but
never read `ctx`; `renderPlainDescription(body, n, ctx)` in panel.js
forwarded it. Both signatures tightened to drop the unused arg
(§9 anti-pattern enforcement).
Smoke-tested via Node eval: all three modules load in order, every
exported registry (wfg, humanize, renderers, panel helpers) is
present, all 10 renderers execute against a synthetic body/node/ctx
triple without error.
Status against Dijkstra audit:
- RED 1 (panel.js > 500 lines): CLEARED.
- RED 2 (dead ctx param): CLEARED.
- YELLOW (panel.js / humanize.js / renderers.js > 300 project cap,
several method-size violations): documented, scheduled for a
follow-up split that moves the neighbor helpers into their own
module and breaks plainDescription/renderTechnicalDetails into
per-kind describers.
- GREEN (pre-existing 300+ Python files inherited from earlier
commits): noted, not in scope for this chain.1 parent 21ba756 commit 640f91c
9 files changed
Lines changed: 390 additions & 304 deletions
File tree
- mcp_server
- core
- infrastructure
- tests_py/infrastructure
- ui
- unified/js
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
305 | | - | |
306 | | - | |
| 304 | + | |
307 | 305 | | |
308 | 306 | | |
309 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
| 228 | + | |
231 | 229 | | |
232 | 230 | | |
233 | 231 | | |
| |||
Lines changed: 13 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 77 | + | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
| |||
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
100 | | - | |
101 | | - | |
102 | | - | |
| 98 | + | |
103 | 99 | | |
104 | 100 | | |
105 | 101 | | |
| |||
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
123 | | - | |
124 | | - | |
125 | | - | |
| 119 | + | |
126 | 120 | | |
127 | 121 | | |
128 | 122 | | |
| |||
134 | 128 | | |
135 | 129 | | |
136 | 130 | | |
137 | | - | |
138 | | - | |
139 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
140 | 137 | | |
141 | 138 | | |
142 | 139 | | |
| |||
197 | 194 | | |
198 | 195 | | |
199 | 196 | | |
200 | | - | |
201 | | - | |
202 | | - | |
| 197 | + | |
203 | 198 | | |
204 | 199 | | |
205 | 200 | | |
206 | 201 | | |
207 | 202 | | |
208 | 203 | | |
209 | | - | |
210 | | - | |
211 | | - | |
| 204 | + | |
212 | 205 | | |
213 | 206 | | |
214 | 207 | | |
| |||
230 | 223 | | |
231 | 224 | | |
232 | 225 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 226 | + | |
236 | 227 | | |
237 | 228 | | |
238 | 229 | | |
| |||
269 | 260 | | |
270 | 261 | | |
271 | 262 | | |
272 | | - | |
273 | | - | |
274 | | - | |
| 263 | + | |
275 | 264 | | |
276 | 265 | | |
277 | 266 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 65 | + | |
68 | 66 | | |
69 | 67 | | |
70 | 68 | | |
| |||
Lines changed: 9 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 99 | + | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
| |||
121 | 119 | | |
122 | 120 | | |
123 | 121 | | |
124 | | - | |
125 | | - | |
| 122 | + | |
126 | 123 | | |
127 | 124 | | |
128 | 125 | | |
| |||
196 | 193 | | |
197 | 194 | | |
198 | 195 | | |
199 | | - | |
200 | | - | |
| 196 | + | |
201 | 197 | | |
202 | 198 | | |
203 | 199 | | |
204 | 200 | | |
205 | 201 | | |
206 | | - | |
207 | | - | |
208 | | - | |
| 202 | + | |
209 | 203 | | |
210 | 204 | | |
211 | 205 | | |
| |||
219 | 213 | | |
220 | 214 | | |
221 | 215 | | |
222 | | - | |
223 | | - | |
| 216 | + | |
224 | 217 | | |
225 | 218 | | |
226 | 219 | | |
| |||
304 | 297 | | |
305 | 298 | | |
306 | 299 | | |
307 | | - | |
308 | | - | |
309 | | - | |
| 300 | + | |
310 | 301 | | |
311 | 302 | | |
312 | 303 | | |
| |||
333 | 324 | | |
334 | 325 | | |
335 | 326 | | |
336 | | - | |
337 | | - | |
| 327 | + | |
338 | 328 | | |
339 | 329 | | |
340 | 330 | | |
| |||
355 | 345 | | |
356 | 346 | | |
357 | 347 | | |
358 | | - | |
359 | | - | |
360 | | - | |
| 348 | + | |
361 | 349 | | |
362 | 350 | | |
363 | 351 | | |
| |||
368 | 356 | | |
369 | 357 | | |
370 | 358 | | |
371 | | - | |
372 | | - | |
373 | | - | |
| 359 | + | |
374 | 360 | | |
375 | 361 | | |
376 | 362 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
| 534 | + | |
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| |||
0 commit comments