Skip to content

docs(verify): record that GNN promotion breaks API serving at startup (BR-1) - #290

Merged
Gavin-Borges merged 2 commits into
mainfrom
docs/promotion-api-break-rescue
Aug 26, 2026
Merged

docs(verify): record that GNN promotion breaks API serving at startup (BR-1)#290
Gavin-Borges merged 2 commits into
mainfrom
docs/promotion-api-break-rescue

Conversation

@Gavin-Borges

Copy link
Copy Markdown
Owner

Rescues BR-1, an operational warning that existed on exactly one local branch, on no remote, and on no task list. Docstring only; no behaviour change.

What it records

Passing the five GNN promotion gates is necessary but not sufficient to ship a GNN, and nothing in the repository said so.

promote_model rewrites config.yaml's model_path to the GNN checkpoint without relocating it. But ModelManager.load passes only config.model_path.name - the basename - to ModelRegistry.load, and resolve_model rebuilds that as models/<basename> relative to cwd. The directory component is discarded, the lookup misses, and FileNotFoundError is raised inside the unguarded startup lifespan handler.

So promoting a GNN makes the API fail to start, /health included. It does not degrade, and it does not fall back.

Two further defects sit latent behind that one: a .pth loads as a raw state_dict with no predict_proba, and _score_peptide builds a flat 31-float vector where GraphPredictorV2.forward expects a PyG batch. There is no model-type dispatch in api/main.py at all.

Re-verified against current origin/main line by line before this branch was cut, not carried forward on the original commit's word: api/main.py:204 passes self.config.model_path.name; model_registry.py:14-19 rebuilds it as models/<basename> and raises only on directory escape; model_registry.py:52 raises the FileNotFoundError; lifespan at api/main.py:342 is _manager.load() with no try/except.

Why it is a fresh branch rather than the original commit

The original commit 27ac579 is authored and signed off as Test <test@example.com>, a placeholder identity from a git misconfiguration - neither correct nor DCO-valid on a repository with a single author of record. It could not be pushed as-is.

This is a clean cherry-pick onto current main, re-authored to Gavin Borges with a matching DCO trailer and GPG-signed. Content is byte-identical to the original; the cherry-pick applied with no conflicts. The provenance is recorded in the commit message rather than lost.

27ac579 is the twentieth commit of the same Test <test@example.com> window. The other nineteen are on published history and are handled by .mailmap in #288, which maps display without rewriting any commit object. This one was never pushed, so it could be re-authored properly instead - which is strictly better, and is why it was deliberately excluded from that mapping.

Passing the five promotion gates is necessary but not sufficient to ship a
GNN, and nothing said so anywhere. promote_model rewrites config.yaml's
model_path to the GNN checkpoint without relocating it, but ModelManager.load
passes only config.model_path.name to ModelRegistry.load, and resolve_model
rebuilds that as models/<basename> relative to cwd. The directory is
discarded, the lookup misses, and FileNotFoundError is raised inside the
unguarded startup lifespan handler - so the API fails to start rather than
degrading, with /health down too.

Two further defects are latent behind that one: a .pth loads as a raw
state_dict with no predict_proba, and _score_peptide builds a flat 31-float
vector where GraphPredictorV2.forward expects a PyG batch. There is no
model-type dispatch in api/main.py at all.

Recorded in the promotion orchestrator's own docstring rather than in a
planning document, which is where this class of knowledge was lost before.
Docstring only; no behaviour change.

(cherry picked from commit 27ac57989ee9e06569ad083cc222ec849bc65d11, re-authored:
the original was committed under a placeholder identity, Test <test@example.com>,
which is neither correct nor DCO-valid on a repo with a single author of record.)

Signed-off-by: Gavin Borges <gavinmborges1104@gmail.com>
@Gavin-Borges
Gavin-Borges merged commit c8b9d5a into main Aug 26, 2026
20 checks passed
@Gavin-Borges
Gavin-Borges deleted the docs/promotion-api-break-rescue branch August 26, 2026 02:44
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