Skip to content

Code review 2026-10-02: fail loudly instead of shipping a silently wrong bundle (default output unchanged) - #103

Merged
adamjohnwright merged 2 commits into
mainfrom
fix/review-2026-10-02
Oct 3, 2026
Merged

adamjohnwright merged 2 commits into
mainfrom
fix/review-2026-10-02

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

These are the pipeline-hygiene findings from the 2026-10-02 code review. Default output is unchanged: GPVI, NODAL and RAF regenerated from this branch match build 20260928-1110_06ccb63 exactly, edge for edge by stable id, and every bundle file has the same row count.

Finding Before After
F2 export failures Every export after logic_network.csv was logged and skipped. That included the orphan guard's deliberate ValueError, so containment.csv, cofactors.csv and node_resolution.csv were missing, the pathway counted as built, and catalog.sh moved current. Regenerating into an existing directory left stale files behind. Raises, so the build is incomplete. Regeneration clears the bundle files first.
F3 LNG_* parsing LNG_HANDOFF_EDGES=false turned harmful edges on. LNG_BOUNDARY_HIERARCHY=true turned the adopted hierarchy off. Typos were never read. src/env_flags.py: a switch takes exactly 0 or 1, and an unknown LNG_* name stops the run at startup.
F5 modifier sets One failed lookup cached a 6-set fallback for the whole run. Raises; nothing is cached on failure.
F11 swallowed lookups The Ub lookup dropped every ubiquitin depletion edge. Containment recorded "contains only itself". node_resolution dropped every set row. Each raises.
F13 docs LNG_DIAGRAM_BRIDGE was listed with default 1, and the DS defaults listed were stale. Corrected. The DS defaults now point to the deltasignal CLAUDE.md.

Tests: every guard is exercised at runtime (test_export_failfast.py drives generate_pathway_file; test_env_flags.py; test_lookup_failures.py), and the old code fails them. Two source-text assertions were replaced by checks on the actual defaults. Default tier: 336 passed.

Not in this PR: the findings that change networks, F7, F1, F10, F9 and F8:

  • a set component of a root complex becomes required AND inputs;
  • set members leak between inputs;
  • set-containing complexes are dissolved;
  • variant pairing crosses members;
  • the E3 ligase is treated as its own substrate.

F7 is verified in Neo4j. For example, "VAV1 Rho/Rac effectors:GDP" is GDP plus a CandidateSet of 5 GTPases, but the network requires all 5. These change benchmark numbers, so they go through a deltasignal spec with pre-registered arms.

🤖 Generated with Claude Code

adamjohnwright and others added 2 commits October 2, 2026 20:18
…lently wrong bundle

- Export failures raise (F2). Every export after logic_network.csv was
  logged and skipped, including the orphan guard's deliberate ValueError, so
  containment.csv/cofactors.csv/node_resolution.csv went missing while the
  pathway counted as built and catalog.sh moved current. Regeneration also
  clears the previous run's bundle files.
- LNG_* switches read through src/env_flags.py (F3): exactly 0 or 1, and an
  unknown LNG_* name is a startup error. LNG_HANDOFF_EDGES=false used to turn
  the harmful handoff edges ON; LNG_BOUNDARY_HIERARCHY=true turned the
  adopted hierarchy OFF; typos were never read.
- Failed Neo4j lookups raise (F5, F11): the modifier-set fallback was cached
  for the whole run; the ubiquitin lookup dropped every Ub depletion edge;
  containment treated a failed lookup as 'contains only itself';
  node_resolution dropped every set row.
- PIPELINE_SETTINGS.md: LNG_DIAGRAM_BRIDGE default is 0; the stale DS
  defaults are replaced by a pointer (F13).

Default output unchanged: GPVI, NODAL and RAF regenerated from this branch
are identical to build 20260928-1110_06ccb63 by stable id, edge for edge,
and every bundle file has the same rows. Runtime tests for each guard; the
old code fails them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…oved fallbacks

14 unit tests passed in CI only because the modifier-set and participating-
entity lookups fell back silently when Neo4j was unreachable, and on a
developer machine they quietly queried the live database. An autouse
fixture now stubs both for every test not marked database. 338 pass with
Neo4j unreachable and with it up.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 6421d6a into main Oct 3, 2026
4 checks passed
@adamjohnwright
adamjohnwright deleted the fix/review-2026-10-02 branch October 3, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant