Skip to content

refactor: depend on the published core, drop the vendored copies - #72

Merged
imran-siddique merged 2 commits into
mainfrom
refactor/depend-on-published-core
Aug 1, 2026
Merged

refactor: depend on the published core, drop the vendored copies#72
imran-siddique merged 2 commits into
mainfrom
refactor/depend-on-published-core

Conversation

@imran-siddique

Copy link
Copy Markdown
Contributor

agentrust-capture-core 0.1.0 is live on PyPI, so the four engines import it as a declared dependency. Removes ~24 duplicated files, the sync script, and the drift check that existed only because copies rot.

This gives up the zero-install property

That was a real promise, stated in three requirements.txt files and four READMEs, so it is worth naming rather than glossing. Three consequences, all handled:

The requirements files were lying. Each said the drift check "uses only the Python standard library — nothing here is needed for them". Now each leads with the core as REQUIRED, and the signing packages are demoted to a "signing only" section. copilot gained a requirements.txt it never had.

The Copilot action had no install step, because it relied on the vendored copy. It now installs the core, pinned >=0.1,<0.2 so a core release cannot silently change what the check measures.

A missing core used to fall through to the vendored copy. Now it raises with the package name and the exact command:

AgenTrust needs agentrust-capture-core, which is not installed.
Install it with:  pip install agentrust-capture-core
Drift detection cannot run without it.

That matters more than it looks. The hook's last-resort guard would otherwise catch the ImportError and emit "integrity check skipped this session", which tells a user nothing about what to do and is exactly the vague failure this project keeps arguing against.

READMEs in claude-code, scheduled-agents, copilot and the package all claimed dependency-free or no-install-step. Corrected.

CI changes shape rather than shrinking

vendored-in-sync is gone because there is nothing left to compare. bare-install-fallback is replaced by two jobs that assert the opposite of what it did:

Job Asserts
engines-import-against-the-installed-core every engine imports a freshly installed core, and that it did not come from a vendored path
missing-core-fails-clearly the engine exits non-zero and names pip install agentrust-capture-core

The publish workflow loses its consistency job for the same reason.

Test plan

  • 184 passed across all five suites.
  • ruff check --target-version py39 clean.
  • Missing-core path exercised locally by blocking the import through a meta_path hook: exits 1 with the install instruction.
  • Every engine confirmed loading the core from site-packages rather than a vendored path.

The remaining failure is the pre-existing codex TRACE conformance test.

One caveat for existing users

Anyone who installed the plugin before this needs pip install agentrust-capture-core or their next session reports the check could not run. The error says so explicitly, but it is a breaking change for a bare install and worth a line in the changelog when this is released.

imran-siddique and others added 2 commits August 1, 2026 09:00
agentrust-capture-core 0.1.0 is on PyPI, so the four engines now import it as a
declared dependency. Removes ~24 duplicated files, the sync script, and the drift
check that existed only because copies can rot.

This gives up the zero-install property, which was a real promise and is worth
stating rather than glossing. Three things follow from it, all handled:

  requirements.txt in claude-code, codex and scheduled-agents each claimed the
  drift check "uses only the Python standard library -- nothing here is needed for
  them". That is now false, so each file leads with the core as REQUIRED and the
  signing packages are demoted to a "signing only" section. copilot gained a
  requirements.txt it never had.

  The Copilot action had no install step because it relied on the vendored copy. It
  now installs the core, pinned to >=0.1,<0.2 so a core release cannot silently
  change what the check measures.

  A missing core previously fell through to the vendored copy. Now it raises with
  the package name and the exact pip command. Without that the hook's own
  last-resort guard would report "integrity check skipped this session", which tells
  a user nothing about what to do.

READMEs in claude-code, scheduled-agents, copilot and the package all claimed
dependency-free or no-install-step. Corrected rather than left to mislead.

CI changes shape rather than shrinking. The vendored-in-sync job is gone because
there is nothing left to compare, and bare-install-fallback is replaced by two jobs
that assert the opposite of what it did:

  engines-import-against-the-installed-core   every engine imports a freshly
                                              installed core, and asserts it did
                                              not come from a vendored path
  missing-core-fails-clearly                  the engine exits non-zero and names
                                              "pip install agentrust-capture-core"

The publish workflow loses its consistency job for the same reason.

Verified: 184 passed across all five suites, ruff clean at py39, and the
missing-core path exercised locally by blocking the import through a meta_path hook.

The remaining failure is the pre-existing codex TRACE conformance test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
The engines now import agentrust-capture-core, so the jobs that installed only
pytest could no longer import them. That is the predictable consequence of dropping
the vendored fallback and I should have updated these in the same commit.

Every engine job now installs the core from ./packages/agentrust-capture-core rather
than from PyPI, so a pull request is tested against the code it changes instead of
whatever is released. The signing jobs install it before -r requirements.txt, so the
local build satisfies the pinned range and the released copy is not pulled over it.

The job named stdlib is renamed drift-without-signing, and copilot's to tests,
because the old names asserted something no longer true. Same for the comments
above them and the step name "Run dependency-free capture tests". The only place a
standard-library-only claim remains is the core's own workflow, where it is still
correct and asserted by a test.

copilot's self-check job also needed the core, since it runs the engine against this
repository.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
@imran-siddique
imran-siddique merged commit 56ee545 into main Aug 1, 2026
30 checks passed
@imran-siddique
imran-siddique deleted the refactor/depend-on-published-core branch August 1, 2026 17:47
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