Skip to content

fix: remove dead kernel entropy gate + hash-pin Docker deps#9

Closed
New1Direction wants to merge 5 commits into
fix/medium-tier-2from
fix/medium-tier-3
Closed

fix: remove dead kernel entropy gate + hash-pin Docker deps#9
New1Direction wants to merge 5 commits into
fix/medium-tier-2from
fix/medium-tier-3

Conversation

@New1Direction
Copy link
Copy Markdown
Owner

The last two actionable MEDIUM items. Stacked on #8; base is fix/medium-tier-2.

Fixed

  • Dead kernel entropy gate removed — STEP-6 ran only if artifact is not None, but every production caller (PipelineDriver) passes artifact=None, so it never fired: dead code presented as an enforced guard. Entropy regression is already enforced by the separate EntropyAnalysisValidator in the pipeline, so removing the block changes no behaviour and stops advertising enforcement that didn't happen. (entropy_monitor and the artifact param are retained.) Per your call: remove, not wire.
  • Docker dependency install is now hash-pinned & reproducible — replaced the unpinned pip install pydantic>=… fastapi>=… … with a fully-resolved, hash-pinned lock (docker/requirements.{in,txt}, generated via uv pip compile --generate-hashes targeting the image's linux/py3.11) installed with --require-hashes. Builds are now reproducible across dates and a tampered/yanked release fails the hash check instead of installing silently.

Verification

  • Full CI Python suite: 1287 passed, 0 failed (the entropy block was dead, so no behaviour change) · ruff check: clean.
  • ⚠️ Docker lock: generated off-target (macOS host) and resolves cleanly via uv for the linux/py3.11 target, but I could not run the actual docker build here. Please validate the Linux build on your GCP before merging (as we discussed).

Remaining MEDIUM item (large — scope separately)

  • Strict-mode reads HOME/CWD/env across ~184 agents — resolving the policy once and passing it in is a genuinely large, cross-cutting refactor (touches both the Python agents and the Rust ports + the parity specs). Best done as its own dedicated effort, not folded into this stack.

🤖 Generated with Claude Code

PI Platform added 5 commits June 1, 2026 13:53
STEP-6 ran only 'if artifact is not None', but every production caller
(PipelineDriver) passes artifact=None, so the gate never fired — dead code
presented as an enforced guard. Entropy regression IS enforced by the separate
EntropyAnalysisValidator in the pipeline, so removing the dead block changes no
behaviour and stops advertising enforcement that didn't happen. entropy_monitor
(still used for entropy_history) and the artifact param (API compat) are kept.
The Dockerfile installed pydantic/fastapi/uvicorn/httpx with unpinned >=
specifiers (no lockfile, no hashes) — non-reproducible across build dates and a
supply-chain risk (a tampered/yanked release installs silently), ironic for a
'deterministic' platform. Added docker/requirements.{in,txt}: a fully-resolved,
hash-pinned lock (uv pip compile --generate-hashes, targeted at the image's
linux/py3.11), and switched the builder to pip install --require-hashes.

NOTE: lock generated off-target (macOS host); validate the actual linux build
('docker build') in CI / on GCP before merge.
The committed tree did not import on a clean checkout: consensus.py and the
console/event-fabric layers imported modules that existed only in the local
working tree (never git-added). Computed the exact import+test closure — 17 valid,
parseable files (the rest of the ~135 untracked files, incl. 55 broken stubs, are
NOT needed). With these, all core packages import, the console app/CLI/production
API import, and the whole committed test suite collects on a clean checkout.

Includes genuinely load-bearing code that was never committed: the event-fabric
replay engine, the console transparency router, and the semantic-radius consensus
breaker. Files committed as-is from the working tree.
git ls-files fails (exit 128) in a non-git checkout (tarball / git archive). Fall
back to globbing src/**/*.py there so the gate runs anywhere, not just in a git repo.
…ross checkouts

Without known-first-party, ruff inferred first-party from present packages, so
I001 import-sort results differed between a full working tree and a clean
checkout/CI (e.g. tests importing the untracked pi_agent_interceptor). Declaring
the pi_* namespaces makes 'ruff check src tests' deterministic.
@New1Direction
Copy link
Copy Markdown
Owner Author

Consolidated. All commits from this PR are now in rust-core-loadbearing (fast-forwarded through the full stack), together with the 17 previously-uncommitted source files the package needed to import. The integration branch now imports cleanly, the committed test suite passes, and ruff/mypy/parse gates are green on a fresh checkout. Closing as superseded — history is preserved on rust-core-loadbearing.

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