Skip to content

fix(policy): v1.2.37 capture live lexical delta D1/D2/D2e — env-pin bindings + empty git -c options (t_9412d7d5) - #56

Open
maximalang wants to merge 1 commit into
codex/company-osfrom
fix/t_9412d7d5-v1237-lexical-delta
Open

maximalang wants to merge 1 commit into
codex/company-osfrom
fix/t_9412d7d5-v1237-lexical-delta

Conversation

@maximalang

Copy link
Copy Markdown
Owner

Why

Post-merge QA of v1.2.34 (card t_85547708, finding F-A HIGH) found the deployed
live clone drifted from trunk again: an uncommitted classifier patch — the "lexical
delta" D1/D2/D2e from card t_f6acc5dc (archived) — sat in its working tree on top of
trunk src/fleet_policy/policy.py, with tests/test_policy_lexical_delta.py
untracked beside it. git log --all -S _ENV_PIN_BINDING was empty: the code existed
in no commit, no branch, no remote. This repeats the "live clone is the sole carrier"
pattern of the v1.2.32→34 rescue; any reinstall or checkout to trunk would silently
lose a fix the running gate already relies on.

Card: t_9412d7d5 (fleet-ops, task_type code).

What

Byte-exact capture of the delta onto trunk 2f2f5ee751b13539a092b980e1dc67bd0bad1b00 (v1.2.34), commit 66bcbaa7b5f9964351c41d3bac144eef526b09d3:

Delta semantics (details in CHANGELOG [1.2.37]):

  • D1 (F1, run2166 call19 class): only an EMPTY-value dotted git -c config assignment (option reset/disable) is exempt from filesystem-operand treatment; every non-empty value stays guarded (fail-closed).
  • D2 (F2, run2172 call26 class): dispatcher env-pin bindings (HERMES_KANBAN_DB/_BOARD/_TASK/_WORKSPACE/_WORKSPACES_ROOT, HERMES_TENANT) as NAME=value tokens are child-process context, not store operands; unknown env names are never exempt.
  • D2e (fail-closed tightening): when the same command expands a bound pin ($PIN/${PIN}), the bound value re-enters the path-guard subjects — a shape previously ALLOWED is now denied.

Verification (local battery mirroring CI; Windows, uv 0.12.7, CPython 3.12.14)

step result
uv sync --frozen --all-groups ventures-fleet-policy==1.2.37, exit 0
uv run --frozen python -m pytest tests/ -q 901 passed, exit 0 (trunk suite 888 + delta 13; branch #55 = 913 incl. 12 router tests — arithmetic consistent)
same under HERMES_KANBAN_TASK=t_ci_simulated 901 passed, exit 0
pytest tests/test_policy_lexical_delta.py -v 13/13 PASSED (F1/F2/F2b recurrences + TP controls)
scripts/check_version_uniqueness.py --root . {"collision": false, "released_max": "1.2.34", "version": "1.2.37", "colliding_refs": [], "unverified_refs": []}, exit 0
uv lock --check exit 0 (lock diff = version line only)
compileall -q src tests scripts integrations exit 0
fleet-policy --root . drift-check {"missing": [], "ok": true}, exit 0
fleet-policy --version {"version": "1.2.37"}, exit 0
build-bundle / verify-bundle 81 files / ok: true, exit 0
uv build sdist + wheel ventures_fleet_policy-1.2.37, exit 0
byte-exactness git ls-tree HEAD blobs == live canonical hashes (above)

Merge notes

…_9412d7d5)

The deployed live clone drifted from trunk again: an uncommitted
classifier patch (source card t_f6acc5dc, archived; the code existed in
no commit or branch, git log --all -S empty) sat in its working tree on
top of trunk policy.py, with tests/test_policy_lexical_delta.py
untracked beside it. Post-merge QA finding F-A (t_85547708) flagged the
repeat of the live-clone-as-sole-carrier pattern from the v1.2.32->34
rescue: any reinstall or checkout to trunk would have lost the fix the
running gate already relies on.

Captured byte-exact onto trunk 2f2f5ee (v1.2.34): policy.py staged blob
cac7780 and test blob
95d7b60 both equal the live canonical
blobs (git hash-object in the live repo). The live clone was NOT
modified - read-only capture; controlled apply follows the merge.

D1 (F1, run2166 call19 class): an EMPTY-value dotted git -c config
    assignment (option reset/disable, e.g. an empty helper value) is a
    config-key NAME, not a filesystem operand; only that form directly
    after git -c is exempt, every non-empty value stays guarded.
D2 (F2, run2172 call26 class): dispatcher worker env-pin bindings
    (HERMES_KANBAN_DB/_BOARD/_TASK/_WORKSPACE/_WORKSPACES_ROOT,
    HERMES_TENANT) as NAME=value tokens bind a child process and mutate
    no store; unknown env names carrying a store path stay denied.
D2e (fail-closed tightening): when the same command expands a bound pin
    ($PIN/${PIN}), the bound value re-enters the path-guard subjects, so
    expansion cannot smuggle a store path past the guard - a shape
    previously allowed is now denied.

Tests: tests/test_policy_lexical_delta.py (captured from the live clone,
13 tests) - FP recurrences F1/F2/F2b plus TP controls proving no
weakening. Full battery on this branch (Windows, uv, CPython 3.12.14,
mirrors CI): pytest tests/ 901 passed plain and under
HERMES_KANBAN_TASK=t_ci_simulated; check_version_uniqueness collision
false (1.2.37, released_max 1.2.34); uv lock --check; compileall;
drift-check ok:true; fleet-policy --version 1.2.37; build-bundle +
verify-bundle green.

Version 1.2.37: 1.2.35/1.2.36 are claimed by open PRs #54/#55; policy.py
may overlap textually with #54 - merge sequencing is the owner's call.
maximalang added a commit that referenced this pull request Oct 6, 2026
- version pins 1.2.36 -> 1.2.39 (pyproject.toml, root plugin.yaml,
  integrations plugin.yaml, src/fleet_policy/__init__.py, uv.lock,
  tests/test_hardening_v121.py); 1.2.37/1.2.38 are claimed by open
  PRs #56/#57, so the next free version is taken per the collision rule.
- tests/test_v1236_router_hook.py: ROUTER_LIVE_SHA pin follows the
  canonical router bytes (v2.2 1ae2e34d... -> v3 5d24308d...).
- CHANGELOG.md: new [1.2.39] section documenting the ROUTES v3 repo copy.

Local CI rehearsal on this tree: pytest tests/ 913 passed;
uv lock --check OK; compileall OK; drift-check ok:true;
build-bundle + verify-bundle ok:true (84 files); fleet-policy --version
1.2.39; router selftest on the exact blob ALL PASS (18 cases + 7
structural, exit 0).
@maximalang

Copy link
Copy Markdown
Owner Author

Consolidated into PR #65 (fix/t_40022daf-consolidation, v1.2.43): this branch was merged onto current codex/company-os with conflict resolution and the residual read-lane fix on top; full suite 1011 passed. Can be closed once #65 merges. (fleet-ops t_40022daf)

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