Repository navigation
fix(witan-core): classify omnigraph 0.13's failures as measured - #466
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Commit validation accepts invalid slots, and CLI contract violations lose indeterminate-write semantics.
2 open findings
What changed in this PR
This stacked PR prepares Witan components for OmniGraph 0.13 while retaining 0.11 compatibility.
Changes:
- Updates timestamps, schema parsing, HTTP contracts, and failure classification.
- Correctly orders history-block commit IDs and recognizes missing graphs.
- Adds regression tests, documentation, and changelog fragments.
| File | Description |
|---|---|
packages/witan-core/witan_core/timeutil.py |
Emits millisecond timestamps. |
packages/witan-core/witan_core/omnigraph.py |
Updates CLI failure handling and retry policy. |
packages/witan-core/witan_core/omnigraph_install.py |
Parses expanded schema-version output. |
packages/witan-core/witan_core/omnigraph_http.py |
Implements HTTP contract validation and graph-state classification. |
packages/witan-core/tests/test_timeutil.py |
Tests timestamp precision. |
packages/witan-core/tests/test_omnigraph.py |
Tests OmniGraph 0.13 CLI failures. |
packages/witan-core/tests/test_omnigraph_install.py |
Tests schema parsing. |
packages/witan-core/tests/test_omnigraph_http.py |
Tests HTTP contracts and failures. |
packages/witan-core/tests/test_binary_contract.py |
Adds storage format 14 expectations. |
packages/witan-core/changelog.d/20261008_142113_blarghmatey_omnigraph_013_error_classification.md |
Records classifier fixes. |
packages/witan-core/changelog.d/20261008_133544_blarghmatey_omnigraph_013_http_api_header.md |
Records HTTP contract support. |
packages/witan-core/changelog.d/20261008_131307_blarghmatey_omnigraph_013_datetime_millis.md |
Records timestamp changes. |
mcp/servers/witan/witan/server.py |
Uses parsed commit ordering for claim verification. |
mcp/servers/witan/witan/commit_ids.py |
Adds commit-ID parsing and comparison. |
mcp/servers/witan/tests/test_tasks.py |
Updates claim-verification tests. |
mcp/servers/witan/tests/test_commit_ids.py |
Tests commit ordering. |
mcp/servers/witan/changelog.d/20261008_132356_blarghmatey_omnigraph_013_commit_id_order.md |
Records commit-ordering fix. |
mcp/servers/witan-code/witan_code/store.py |
Recognizes unquoted missing-graph errors. |
mcp/servers/witan-code/tests/test_store.py |
Tests both missing-graph wordings. |
mcp/servers/witan-code/changelog.d/20261008_142114_blarghmatey_omnigraph_013_error_classification.md |
Records missing-graph fix. |
docs/glossary.md |
Documents history-block commit IDs. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The commit id parser accepted any non-negative slot. Upstream caps a block at 16384 slots and refuses an id at or above that, so such an id did not come from omnigraph. Parsed, it would have ordered as a real, newer commit and satisfied the catch-up check instead of taking the unknown-id path. Claude-Session: https://claude.ai/code/session_01Mfmuz4DTn557AV8V17o98A
Run against the 0.13.0 binary, several failures no longer look the way witan-core's classifier expects. Each change below is additive, so 0.11 behaves as before. - `omnigraph version` prints `internal-schema 14 (serves v14 to v14)`. reported_internal_schema() took the last token and raised ValueError, which would fail bin/check_omnigraph_format.py at the pin bump. - A server-backed read with `--format json` prints its failure as JSON on stdout and leaves stderr empty. Classifying stderr alone made an unknown graph, a blocked graph and an unreachable server all fatal, with an empty message. The CLI attempt now reads an error object off stdout. Stdout that is not one (rows from a read that died) is never matched against the marker tables. - An unreachable server is "server discovery connection failed … this data request was not sent", which contains neither `tcp connect error` nor `dns error`, so the CLI path would not have waited out a restart. - A blocked graph answers 503 graph_unavailable and is not retried by the server until its next restart. Over HTTP every 503 waited out the restart budget. It is fatal now on both transports. The loading and transitioning 503s share the status and code, differ only in prose, and are still waited for. - CLI exit code 75 means a 429 refused before any effect: admission cap. A read reports the same 429 as an error object, matched by its too_many_requests code. - The CLI reports a data response it found unstamped as "this request's effects are unknown". That is CONTRACT_VIOLATION now, so a write over the CLI raises WriteIndeterminate as one over HTTP does. - An unknown graph is `graph not found`, without the quoted id that witan-code's `_NOT_FOUND_RE` required, so a missing cluster graph was reported as an unreachable cluster. test_binary_contract gains a format-14 row. Every surface it measures came out as format 9's on 0.13.0. Left for the pin bump, because removing them would change 0.11: the auto-repair on NEEDS_REPAIR (`repair --confirm --force` is a usage error on 0.13) and the OCC-sidecar quarantine markers. Claude-Session: https://claude.ai/code/session_01Mfmuz4DTn557AV8V17o98A
blarghmatey
force-pushed
the
omnigraph-013-error-classification
branch
from
October 8, 2026 19:53
e3af3b7 to
7aa4b25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What are the relevant tickets?
N/A (witan task tk-re-derive-witan-core-s-error-classification-agai-a6d8da, part of the omnigraph 0.13 upgrade, spec in #461 D7)
Description (What does it do?)
witan-core classifies omnigraph failures by CLI text and HTTP status. I ran the released 0.13.0 binary and a scratch
omnigraph-server --clusterthrough each failure in the argument shapes we use (reads with--format json, writes with--quiet) and several no longer look the way the classifier expects. Every change here is additive, so 0.11 behaves as before.omnigraph versionprintsinternal-schema 14 (serves v14 to v14).reported_internal_schema()took the last token as the number and raisedValueError, which would failbin/check_omnigraph_format.pyat the pin bump.server discovery connection failed (DNS, TCP, proxy, or TLS); … this data request was not sent. It contains neithertcp connect errornordns error, so the CLI path would not have waited out a restart.503 graph_unavailable, and the server does not retry it until its next restart. Over HTTP every 503 waited out the 150s restart budget. It is fatal now on both transports. A loading or transitioning graph answers with the same status and code and different prose, and is still waited for.too_many_requestscode.this request's effects are unknown. That isCONTRACT_VIOLATIONnow, so a write over the CLI raisesWriteIndeterminateas one over HTTP does.graph not found, without the quoted id that witan-code's_NOT_FOUND_RErequired, so a missing cluster graph was reported as an unreachable cluster.A second, small commit makes the commit id parser from #463 refuse a history-block slot of 16384 or more, which omnigraph cannot emit. It was raised in review here after #463 had merged.
test_binary_contract.pygains a format-14 row. Every surface it measures came out the same as format 9's.Not in this PR, because removing them would change behaviour on 0.11 while it is pinned: the auto-repair on
NEEDS_REPAIR(repair --confirm --forceis a usage error on 0.13) and the OCC-sidecar quarantine markers, which no longer appear in upstream's source. They belong with the pin bump. The remaining CLI-path gaps I know of are listed on the task.What I did not verify on the binary and took from upstream's source at v0.13.0: the loading and transitioning 503 wordings,
server discovery timed out, and what triggers exit 75.How can this be tested?
just test-witan-core758 passed,just test-witan-council1450 passed,just test-witan-code684 passed.packages/witan-core: 718 passed, with 1 failure and 11 errors all intest_binary_contract.py(the version-line parse and the missing format-14 row). With those fixed, that file passes (29 passed, 1 skipped).mcp/servers/witan-code: 681 passed, 1 failed. The failure istest_rebuild_refuses_a_path_that_is_not_the_repo_root, which also fails on 0.11 whenTMPDIRis a long path and passes with the default one.mcp/servers/witan: 1444 passed, 2 failed.test_pre_upgrade_candidates_exclude_the_current_binaryfound the second binary my harness puts on PATH.test_apply_schema_upgrades_an_old_storefailed once with an empty CLI message and passed on rerun; I did not find out why.https://claude.ai/code/session_01Mfmuz4DTn557AV8V17o98A