Skip to content

fix(history): preserve malformed legacy carrier values (partial #83) - #89

Draft
drevendev wants to merge 23 commits into
release/0.6.0from
fix/83-legacy-carrier-admission
Draft

drevendev wants to merge 23 commits into
release/0.6.0from
fix/83-legacy-carrier-admission

Conversation

@drevendev

Copy link
Copy Markdown
Owner

Legacy carried_observation() replaced a malformed value-bearing predecessor series with [] before admission could inspect it. An AVAILABLE or PARTIAL predecessor containing null, false, 0, "", {} or a missing value could therefore appear to carry known-empty history. This repair preserves that malformed value so the existing parser/reconciliation/evaluator returns REVISION_HISTORY_CARRY_MALFORMED, UNKNOWN and no band.

Target: B1
Target: B3

Related to #83; partial repair only, keep #83 open. Related research/status work: #87.

Base and dependency

Bounded behavior

  • Remove the list-type coercion from the legacy AVAILABLE/PARTIAL value selection.
  • Apply window filtering and replay projection only to actual lists; preserve other values for existing carried-record admission.
  • Keep list projection, window filtering and valid observed failures unchanged.
  • Add 30 regression instances: 10 invalid-value preservation cases, 10 public no-favorable-result cases, 2 actual-empty shape controls, 4 valid pass/fail projection/window controls, 2 missing-value cases, and 2 four-generation real-store failure/replay cases.
  • Update Integrity specification and implementation-local conformance mapping.
  • No Vital threshold, policy, history-lineage or runtime-dependency change.

The empty-list controls cover existing conversion shape compatibility; they do not establish complete acquisition or resolve valid PARTIAL inventory uncertainty.

Executed tests at this exact head

Windows 11 build 26200, Python 3.14.7, pytest 9.1.1, 2026-10-24. Source import confirmed from the fixing checkout, with PYTHONDONTWRITEBYTECODE=1 and PYTHONPATH=src.

Check Result
New regressions on the real unpatched base package 22 failed / 8 passed, expected red
python -B -m pytest -p no:cacheprovider tests/test_legacy_carrier_admission.py tests/test_carried_array_admission.py tests/test_revision_history.py tests/test_ci_history_admission.py --basetemp=<dedicated scratch> 116 passed
Single full native Windows run outside sandbox: python -B -m pytest -p no:cacheprovider --basetemp=<dedicated scratch> --junitxml=<external evidence path> 2608 passed in 82.97s; 0 failures/errors/skips; exit 0
python -B -m devostasis vectors --quiet 148 passed
python -B scripts/check_conformance_surface.py 63 passed
Offline core, code-v1, code-v2, v2 packet and work verify/replay 6 checks passed
Four-generation v1 → v2 → v2 → v2 store chains All bundles verify; retained failure and exact byte/ID replay
git diff --check <base>..HEAD, final worktree check PASS; clean

An initial test fixture attempted replay after publishing the successor and correctly triggered predecessor validation. Its order was corrected before changing production code; the final unpatched red control above and all subsequent checks used the corrected fixture. Tests were not weakened.

Independent review

A separate reviewer inspected the exact four-file base-to-head diff and actual conversion, parser, reconciliation and public evaluator paths.

No actionable findings within this bounded scope. Independently executed:

  • 93 focused tests passed in 2.28s;
  • real-base red reproduction: 22 failed / 8 passed;
  • 16 admissible non-null malformed AVAILABLE/PARTIAL store cases: predecessor and resulting bundle verify, UNKNOWN/no band with CARRY_MALFORMED, and exact saved-observation replay;
  • 40 differential carrier/evaluator outputs identical for behavior that should remain unchanged: valid/empty lists, passing/failing/incomplete histories, window boundaries, malformed records and non-value-bearing statuses;
  • diff whitespace check and source/evidence/patch verification.

The reviewer did not repeat the full suite; the 2608-pass full run above is a separate primary execution. AVAILABLE/null is rejected by the current Observation constructor before store creation, so null/missing values were checked through real conversion/evaluation tests; the store probe covers admissible non-null values. The review used a separate agent in the same owner/host environment, not separate credentials or release approval.

Public-safe evidence digests:

  • bounded patch SHA-256: fc673a94e6aed4a8f3bb9e647dbb7036e6291e5b322aaeecaf2fa3cf7b3116c5;
  • committed new test source and named commands provide the reproducible regression corpus.
    Private task state, absolute local paths, transcripts and raw private evidence manifests are not published.

Remaining #83 scope and limits

This PR does not close #83 or #87:

  • v1 parent-kind conflict propagation when the same parent_id has different kind;
  • preservation of structural conflicts through later complete-current reconciliation (conflict stickiness); propagation and reconciliation must be addressed together;
  • non-value-bearing legacy status handling (UNKNOWN/UNAVAILABLE/FORBIDDEN/ERROR) without promoting missing evidence to an empty AVAILABLE carrier;
  • complete-empty acquisition proof and inventory-level uncertainty for valid PARTIAL history across successor bundles, under Research: legacy Integrity predecessor UNKNOWN/UNAVAILABLE becomes AVAILABLE empty carrier #87's compatibility requirements;
  • propagation through the other prepared release candidates.

Linux, Python 3.12/3.13 and hosted CI were not run for this repair. The broader release and prerequisite acceptance gates remain separate. No automatic issue closure, merge or release is requested.

abogun-product and others added 23 commits October 21, 2026 14:16

@andy-zen-dev andy-zen-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent exact-head review of the bounded legacy-conversion repair in #89: 9cf0c0cf678aeef620b5f6d6a1662533894c10b2..1a735f451f9fe6dae7948a014b660249501a1ffc (one commit; four files; +184/-4). This does not review the unmerged prerequisite stack included in the GitHub PR's overall diff.

I inspected the complete incremental patch in src/devostasis/revision_history.py, tests/test_legacy_carrier_admission.py, docs/spec/integrity-ci.md and docs/spec/conformance.md, with the actual surrounding _in_window, _replay_source, _carried_records, reconcile, integrity.evaluate and repository contribution rules.

No actionable merge-blocking finding in this bounded change. It correctly stops replacing malformed value-bearing 0.1.x AVAILABLE/PARTIAL series with []: non-lists now survive projection and are rejected by carried-record admission; actual lists keep the existing window/projection behavior. The 30 parameterized regression instances cover five malformed shapes across both statuses, downstream UNKNOWN/no-band behavior despite a passing current control, real empty-list compatibility, valid pass/fail preservation and four-generation bundle verification/replay. Documentation explicitly scopes the fix as admission, not accepted status/coverage semantics.

Exact-head hosted verification: Actions run 40097188476 is completed/success; its Python 3.12, 3.13 and 3.14 jobs and all reported steps succeeded. I did not independently execute a local pytest or historical replay in this review; CI is hosted evidence, not my own execution.

COMMENT, not merge/release approval: #89 remains draft and stacked on unmerged #88 and #81; the release branch is still 22a2894057d9b1bc003efe4ef932ed4de601e26b. Do not merge this cumulative PR before reconciling its prerequisites and independently reviewing the integrated exact head. Keep #83 open (parent-kind persistence is separately proposed in #90), and keep #87's legacy non-value-bearing statuses, completeness and valid PARTIAL semantics with the research authority. This review must not be interpreted as accepting those contracts or the inherited release scope.

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.

3 participants