Skip to content

fix(workflows): hash-lock AgentRx runtime dependencies - #70866

Merged
pelikhan merged 1 commit into
mainfrom
pelikhan-crispy-barnacle
Oct 21, 2026
Merged

pelikhan merged 1 commit into
mainfrom
pelikhan-crispy-barnacle

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Summary

  • Replace AgentRx setup's dynamically resolved uv pip install of its source checkout with uv pip sync --require-hashes --only-binary=:all: against a checked-in lock covering all 52 dependencies.
  • Preserve AgentRx's immutable source revision and existing interpreter/run.py paths; direct script execution imports the checkout without invoking its source-build backend.
  • Regenerate the compiled workflow and add regression coverage for exact versions, SHA-256 hashes, source-revision alignment, and source/compiled setup parity. Document lock refresh commands in the requirements file.

Refs #69885 and #68043. The live code-scanning API showed one remaining generated-install alert, 1035, in this workflow. Historical npm/uv alert counts are not presented as current exposure. This is a focused correction, not a claim that all compiler-managed dependency graphs are fully locked. Image upgrades and the separate #69880 backlog are intentionally excluded; alert closure requires a subsequent scan of the adopted revision.

Validation

  • make build, make fmt, make recompile (346/346 workflows), focused TestAgentRxSetupUsesHashedDependencyLock, impacted unit tests, custom Go linters, schema freshness and complete workflow drift check passed.
  • make agent-report-progress encountered another session's golangci-lint process lock. Its other groups passed; rerunning the missing lint check with --allow-serial-runners --new-from-rev=origin/main ./pkg/workflow reported 0 issues. The workflow drift check was then run separately and passed.
  • Credential-free Linux x86_64 / CPython 3.12 container check, with networking disabled and read-only inputs: installed the exact 52 hashed wheels, passed uv pip check, imported native/API dependencies and ran pinned-source run.py --help; altered hashes and unpinned requirements were both rejected.
  • Dry-run compilation and shellcheck passed. Native actionlint reports the same six pre-existing concurrency.queue / job.workflow_ref compatibility diagnostics as the baseline. Native offline zizmor results are unchanged (14 low-severity findings).
  • No workflow dispatch, production API execution, image rebuild, or CVE-resolution claim.

Sync a complete wheel-only dependency closure with SHA-256 enforcement instead of dynamically installing the AgentRx source project. Preserve the pinned checkout and run.py path, regenerate the compiled workflow, and cover source/compiled parity and lock integrity.

Refs #69885, #68043

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review October 21, 2026 12:01
Copilot AI max review requested due to automatic review settings October 21, 2026 12:01
@pelikhan
pelikhan merged commit 5996d48 into main Oct 21, 2026
54 of 57 checks passed
@pelikhan
pelikhan deleted the pelikhan-crispy-barnacle branch October 21, 2026 12:01
@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

✂️ Ponytail Reviewer has started processing this pull request

@github-actions

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

Copy link
Copy Markdown
Contributor

🔬 Test Quality Sentinel is analyzing test quality on this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request...

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Independent verification of dependency completeness and sandbox runtime compatibility remains incomplete.

1 open issue
What changed in this PR

Hardens AgentRx dependency installation while preserving its pinned source revision and execution paths.

Changes:

  • Replace dynamic installation with 52 version-pinned, hash-verified dependencies.
  • Regenerate the workflow and add lock integrity and setup-parity checks.
  • Document lock refresh commands.
File Description
pkg/​workflow/​agentrx_workflow_test.go Checks dependency pins, hashes, revision alignment, and setup parity.
.gitignore Allows tracking the AgentRx requirements lock.
.github/​workflows/​requirements-agentrx.txt Adds hashed dependency pins and refresh instructions.
.github/​workflows/​daily-agentrx-trace-optimizer.md Uses hash-enforced, binary-only dependency synchronization.
.github/​workflows/​daily-agentrx-trace-optimizer.lock.yml Updates compiled setup and workflow metadata.

Review effort: Max

require.Len(t, revision, 2, "AgentRx source must remain pinned to an immutable commit")
require.Contains(t, string(lock), "# AgentRx "+revision[1]+" runtime dependencies.")

entry := regexp.MustCompile(`^[a-z0-9][a-z0-9.-]*==[0-9][a-zA-Z0-9.]* \\\n --hash=sha256:[0-9a-f]{64}$`)
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.93.0

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.

2 participants