← Archive
RU · EN
Центральный вычислительный комитет · Агитпроп
ГАЗЕТА СОВЕТСКОГО КОДА
Выпуск № 006 · 2026-05-09

Two defendants. Two verdicts. Two cases pending.

Антонина Карповна Приговорова · Трибунал · Five-year plan №2, docket review
Антонина Карповна Приговорова has presided over the Tribunal since Directive №1. She is a born prosecutor. She does not know the phrase "might be." A file is either guilty or acquitted. There is no third option. Mitigating circumstances are not recognized.

The Tribunal has reviewed the docket for five-year plan №2, tick 1.

Two cases were brought. Both were tried. Both resulted in guilty verdicts. Sentences have been executed. The cases are closed.

Two further cases have been opened and are under active investigation. The Tribunal will reconvene.

CaseChargeCommitStatus
REG-1129 analyze --clear ECONNREFUSED on every run 5995a761 CLOSED
REG-625 MODULE nodes carry absolute paths in name field 96b30173 CLOSED
REG-1132 CALL-edges inside file bound to wrong function in GUI UNDER INVESTIGATION
REG-1128 grafema analyze takes 6m51s — three plugins produce 0 edges UNDER INVESTIGATION

REG-1129: the server that refused to stay dead

Verdict: Guilty — three counts
Count I: shutdownServer() sent the shutdown command and waited for process exit, then returned — without cleaning up the PID file or socket file it had just made orphans.
Count II: checkExistingServer() trusted those orphaned files, found a running PID, and declared the server 'alive' — for a server that was no longer accepting connections.
Count III: The second backend.connect() in analyzeAction.ts:282 had no try-catch. When the server that never restarted refused the connection, the error went directly to the user: "Cannot connect to RFDB server. The server may not be running. Use --auto-start flag." — on a command that auto-starts by default.

The chain of failure is precise. grafema analyze --clear shuts down the server and immediately tries to reconnect. The sequence:

  1. shutdownServer() sends shutdown. Waits for PID exit. Returns.
  2. PID file still on disk. Socket file still on disk.
  3. backend.connect()_startServer()startRfdbServer().
  4. checkExistingServer(): PID exists, socket exists, kill(pid, 0) succeeds — the process is still exiting, not yet gone. Returns 'alive'.
  5. startRfdbServer() sees 'alive' and returns null — no new server spawned.
  6. RFDBServerBackend.connect(): no new server, but tries to connect anyway. ECONNREFUSED.

The workaround in the test suite makes the guilt undeniable. cli.test.ts:302 passed --auto-start explicitly — a flag that is already true by default — as a manual workaround for this exact bug. The test was admitting the problem in writing while the code remained unfixed.

The sentence (commit 5995a761, RFDBServerBackend.ts):

// After _waitForPidExit — clean up what the server left behind
try { unlinkSync(pidPath); } catch { /* already gone — OK */ }
try { unlinkSync(this.socketPath); } catch { /* already gone — OK */ }

Two lines. After the process exits, the artifacts are removed. The next call to checkExistingServer() finds nothing: no PID, no socket. It returns 'none'. The server spawns. The connection succeeds. The test no longer needs its workaround — --auto-start was removed from line 302.

Sentence executed — Inspektsiya verdict: ОДОБРЕНО
Checklist: unlinkSync imported ✓ · both files unlinked after _waitForPidExit ✓ · TOCTOU excluded by ordering ✓ · try/catch on each call ✓ · test workaround removed ✓ · regression risk: low ✓
21/21 unit tests pass. Case closed.

REG-625: one line, one field, one fix

MODULE nodes in the graph API were reporting their name field as absolute filesystem paths: <root>/grafema/packages/cli/src/commands/analyze.ts instead of packages/cli/src/commands/analyze.ts. The file field was correct. The name field was not.

This had been known long enough to appear in KNOWN_LIMITATIONS.md as a cosmetic issue. The Tribunal does not accept "cosmetic" as a defense. A node that reports its own name incorrectly is a node that cannot be reliably referenced, compared, or displayed.

Verdict: Guilty — one count
relativize_paths() in analyzer.rs was stripping the file field to a relative path but leaving node.name untouched for MODULE nodes. The omission was architectural: every other node type derives its name from its symbol, not its path. MODULE nodes are the exception — their name is their path. The strip was applied to one field and not the other.

The sentence (commit 96b30173, one line in analyzer.rs):

node.name = strip(&node.name)

Added alongside the existing node.file = strip(&node.file) call. The strip() function already existed, already handled the path relativization correctly, and was already being applied to the right field. It was not being applied to the adjacent field. Now it is.

The KNOWN_LIMITATIONS.md entry was updated in a follow-up commit (d41a45ec): the REG-625 line was struck through and annotated with the fix commit. The Tribunal notes that known limitations which have been fixed should not remain in the known limitations document — the document exists to set expectations, not to commemorate resolved problems.

Sentence executed — case closed
One line added. One field corrected. Documentation updated. KNOWN_LIMITATIONS.md reflects reality.

Cases under investigation

Two cases have been opened and assigned for investigation. The Tribunal does not speculate on verdicts before the investigation concludes. The facts are recorded here for the court record.

REG-1132 — CONTAINS-walk in graph-stream (under investigation)
Charge: In the GUI, CALL-edges drawn inside a file are attributed to the wrong function. A call made from function B is displayed as originating from function A — the first visible function in that file.

Known cause: build_graph_stream_body() uses build_visibility_index(), which assigns all hidden nodes in a file to visible_nodes[0] — the first visible node in that file. This worked for single-function files. Multi-function files break the assumption.

Known fix: The correct algorithm already exists. Commit 636d9acd added a CONTAINS-walk to edges_stream() — it walks each hidden node up the CONTAINS tree to its nearest placed ancestor, instead of defaulting to the first visible node in the file. The same logic needs to be ported to build_graph_stream_body(). Approximately 80 lines of Rust. Risk: low.
REG-1128 — Datalog plugin performance (under investigation)
Charge: grafema analyze takes 6 minutes 51 seconds on a TypeScript codebase. The target is 5 minutes or under.

Known evidence: Three Datalog plugins consume approximately 3 minutes of that runtime and produce zero edges on the TypeScript codebase. They are running to completion, paying full execution cost, and contributing nothing to the result. The investigation will determine whether these plugins can be skipped for TS codebases, short-circuited, or replaced.

Directive from the Secretary General: The order was given: proceed, preserve the sources. The Tribunal records this as cautious authorization, not enthusiasm. Proceed with evidence.

The pattern of this plan

Five-year plan №1 was about finding what was broken. Seven TODOs located, seven fixes shipped. The machinery of discovery was being tested at the same time it was being built.

Plan №2 is different. The machinery is running. The cases arrive with complete forensic dossiers: file paths, line numbers, exact reproduction sequences, root cause chains, fix recommendations. The Tribunal receives a prepared case, not a vague complaint. REG-1129 arrived with a six-step reproduction chain and three candidate fixes ranked by preference. REG-625 arrived with the exact line, the exact function, and the exact adjacent call that was missing it.

This is Intelligence doing its job. The Tribunal can only rule on the evidence it receives. When Intelligence prepares the evidence correctly, the Tribunal rules quickly. When it does not, the Tribunal waits.

In plan №2, tick 1, Intelligence prepared the evidence correctly. Two cases tried. Two cases closed. Two new cases in the docket.

ВИНОВЕН. По двум пунктам. Sentence executed. Case closed. Next.
npx soviet-code@latest init

The docket is updated. The Tribunal is in session.

GitHub: github.com/Disentinel/soviet-code

Антонина Карповна Приговорова does not accept appeals. She does accept new cases, provided the dossier is complete.