Repository navigation
Handle malformed model-run cache version values without TypeError #4
Description
Gap and evidence
Direct calls to merge_snapshots and presentation use set membership on schema_version without checking its type. A malformed cache envelope such as {"schema_version": []} raises TypeError: unhashable type: list instead of producing the documented invalid-cache warning. The normal raw-cache reader already filters versions, so this is a lower-priority adapter boundary defect, not evidence that ordinary reads currently fail.
Acceptance
- Treat non-string, missing and unsupported schema_version values as invalid/unsupported with the existing warning semantics; no uncaught TypeError from either public adapter function.
- Add focused direct-adapter regression cases for list/dict/null values and confirm valid raw-v1/raw-v2 envelopes retain behavior.
- Preserve known aggregates and represent unavailable breakdowns as unknown; do not infer status from logs.
Execution-session evidence — 2026-09-27
A source patch was implemented and tested against exact fetched preimages from 11f32c597f3763137b041e7d867d346e782b3bf9; it is not committed, pushed or merged. The delivery target remains the existing draft PR #1, not a duplicate integration PR.
The patch adds a shared dictionary/string/version guard before membership testing in both public adapter functions and 28 direct-adapter cases. These cover malformed list/dict/null/bool/number/missing/unsupported versions, valid raw-v1/raw-v2 readback, input immutability, retained aggregates/unknowns, authoritative scheduler status and preservation of a fresh candidate after an invalid prior envelope.
Measured result: the new tests against the unmodified adapter produced 8 failed / 20 passed; against the patch they produced 28 passed / 0 failed / 0 skipped. The adapter preimage's Git blob is 6df6d81c974a8b8db70bf0178d36d82859ef2e46, matching GitHub. Runtime was isolated Linux/Python 3.13.5 with synthetic cache data and the actual fetched adapter/contract modules. This is not the supported Python >=3.13.12 locked Overwatch suite, live producer evidence, or UI acceptance.
Artifact: overwatch-cache.patch in the corresponding execution-session source bundle; SHA-256 51cb3807633928e2c63401fcc61f9d0538c073a651be00f2218f778e8ebe6cda. The patch passed git apply --check and exact postimage comparison on fetched preimages.
Remaining delivery blockers: the session has no access to the primary workstation checkout/running service or configured verified SSH signer; full supported backend validation is also gated by #2. No unsigned/API substitute commit was created. Keep this issue open until the fix is delivered through the required signed/check/merge workflow.
Windows primary-checkout integration — 2026-09-27
The cache guard is now implemented on the existing draft PR #1 in verified SSH-signed commit 1ea1bf2: #1. Its 28 direct-adapter cases pass on isolated Python 3.13.12, including malformed versions, valid v1/v2 preservation, known recovery aggregate/unknown breakdowns and authoritative scheduler status. The full supported locked backend remains blocked by the private TypeSafe index 401, and PR #1 is unmerged. Keep this issue open until the integrated change is merged and required gates are read back.
Activity
romgenie commentedon Sep 27, 2026
Reconciled live readback — cache candidate superseded by existing PR #1
The original observation below was against
11f32c597f3763137b041e7d867d346e782b3bf9. A later live recheck found that the Windows integration has already advanced the existing PR #1 toed825bf1c2c4c19eb3de99ad46564c5803bb4a39, with cache repair1ea1bf2d67bb9925f27e7f71502047798710064cfollowed by the CI commit. GitHub's Git commit API reports verified/valid SSH signatures for both commits, with the parent chain intact. This session did not author or push those commits.Do not apply this session's independent cache patch over that branch. It is now a historical comparison artifact, not a requested second repair. Continue the already committed repair through the existing PR #1; no competing PR was created. At the current head,
frontend-typecheck-vitest-buildis completed/success andbackend-lint-and-locked-testsis completed/failure in run36305664862. The PR/issue readback attributes the backend failure tomissing_authorized_tscore_index_token; the local Windows report still records HTTP 401 fortypesafe==0.2.2. The earlier zero-check result applies only to the old head.Historical isolated evidence from this session
The original adapter preimage matched Git blob
6df6d81c974a8b8db70bf0178d36d82859ef2e46. An independently prepared string/version guard preserved existing warning behavior, valid v1/v2 handling, input immutability, known aggregates, unknown breakdowns and run identities. Direct-entrypoint tests produced 8 failures / 20 passes on the unchanged adapter and 28 passes / 0 skips after that candidate; compileall passed. Runtime: isolated Python 3.13.5, not the supported locked Overwatch backend.Historical patch:
overwatch-cache-version-guard.patch, SHA-256e9cb2f7a93a7ca272ec5ccea843510fda3e7ec1cc5f1bdd9fc271c21a4a7f4b5. Exact preimage apply/reverse checks passed. This is distinct from the earlier patch subsequently integrated on the Windows branch. It is retained only to identify this session's measurements; those tests are not claimed as a fresh run againsted825bf.Keep #4 open and PR #1 draft. Full supported backend, fresh collector/report/populated-UI evidence and the required merge/readback remain outstanding. This session has not accessed or synchronized the actual Windows checkout/service, made SSH-signed commits, or established local clean state/divergence. The Layev installer also vendors this adapter and needs reconciliation with the accepted integration revision; no vendor copy was changed here.
CompleteDotTech commentedon Sep 28, 2026
Supported-Python focused readback — 2026-09-27/28
The current draft PR #1 direct-adapter regression suite was rerun on this Windows workstation under Python 3.13.12: 28 passed, zero skipped. It covers malformed list/dict/null/bool/number/missing/unsupported cache versions, valid raw-v1/raw-v2 envelopes, aggregate preservation and unknown unavailable breakdowns. The test uses synthetic cache fixtures and is not a locked backend or live provider pass. PR #1 remains draft/unmerged because the approved private
tscoreindex route is missing from local and hosted CI. Keep all original issue #4 acceptance boxes open until protected full backend delivery and post-merge readback.