Skip to content

Handle malformed model-run cache version values without TypeError #4

Open

Description

@CompleteDotTech

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

  1. added
    bugSomething isn't working
    priority:P2Follow-up validation or robustness
    area:cacheVersioned model-run cache robustness
    evidence:confirmedGap reproduced or verified against current source/live state
    on Sep 27, 2026
  2. romgenie commented on Sep 27, 2026

    @romgenie

    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 to ed825bf1c2c4c19eb3de99ad46564c5803bb4a39, with cache repair 1ea1bf2d67bb9925f27e7f71502047798710064c followed 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-build is completed/success and backend-lint-and-locked-tests is completed/failure in run 36305664862. The PR/issue readback attributes the backend failure to missing_authorized_tscore_index_token; the local Windows report still records HTTP 401 for typesafe==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-256 e9cb2f7a93a7ca272ec5ccea843510fda3e7ec1cc5f1bdd9fc271c21a4a7f4b5. 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 against ed825bf.

    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.

  3. CompleteDotTech commented on Sep 28, 2026

    @CompleteDotTech
    OwnerAuthor

    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 tscore index 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cacheVersioned model-run cache robustnessbugSomething isn't workingevidence:confirmedGap reproduced or verified against current source/live statepriority:P2Follow-up validation or robustness

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions