Remove stale VM-agent binary artifact - #1710
Closed
simple-agent-manager[bot] wants to merge 5 commits into
Closed
Conversation
Contributor
|
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
packages/vm-agent/vm-agentfrom source control./packages/vm-agent/vm-agentand a CI quality guard,pnpm quality:tracked-artifacts, that fails if the exact stale root binary is tracked or present in the working tree.packages/vm-agent/bin//apps/api/container-artifacts/.Deployment artifact evidence:
.github/workflows/deploy-reusable.ymlrunsmake -C packages/vm-agent prepare-container VERSION="$GITHUB_SHA" BUILD_DATE="$BUILD_DATE"before the raw container build.apps/api/Dockerfile.vm-agent-containercopiesapps/api/container-artifacts/vm-agent-linux-amd64to/usr/local/bin/vm-agent..github/workflows/deploy-reusable.ymlrunsmake -C packages/vm-agent build-all VERSION="$GITHUB_SHA" BUILD_DATE="$BUILD_DATE"and uploadspackages/vm-agent/bin/vm-agent-linux-amd64andpackages/vm-agent/bin/vm-agent-linux-arm64to R2.packages/cloud-init/src/template.tsandscripts/vm/cloud-init.yamldownload VM-agent from/api/agent/downloadinto/usr/local/bin/vm-agent; they do not usepackages/vm-agent/vm-agent.Validation
pnpm lintpnpm typecheckpnpm testpnpm exec vitest run --config scripts/quality/vitest.config.ts scripts/quality/check-tracked-artifacts.test.ts— passed, 3 tests.pnpm quality:tracked-artifacts— passed.pnpm exec vitest run --config scripts/quality/vitest.config.ts— passed, 119 tests across 11 quality test files.pnpm quality:source-contract-tests— passed.pnpm quality:file-sizes— passed.git ls-files packages/vm-agent/vm-agentreturned no tracked file after deletion;test ! -e packages/vm-agent/vm-agentpassed; exact-path grep found no non-guard/task references./tmp/sam-go-install/go/bin/go test -race ./...frompackages/vm-agentwas attempted with Go 1.25.0, but local execution could not complete because this workspace has no Docker (docker-dependent PTY/server tests failed withexec: "docker": executable file not found in $PATH). GitHub VM-agent CI jobs run on Ubuntu with Docker available.Staging Verification (REQUIRED for all code changes — merge-blocking)
All checkboxes below are mandatory for any PR that changes runtime code (
.ts,.tsx,.go, etc.). WriteN/A: docs-onlyONLY if the PR contains zero runtime code changes. See.claude/rules/13-staging-verification.md.Staging Verification Evidence
N/A: this PR deletes a stale tracked binary and adds a repository quality guard. It does not change runtime code or deployed behavior. Deployment artifact paths are verified in the Summary above.
UI Compliance Checklist (Required for UI changes)
End-to-End Verification (Required for multi-component changes)
.claude/rules/10-e2e-verification.md)Data Flow Trace
.github/workflows/ci.yml→ Code Quality Checks →pnpm quality:tracked-artifacts→scripts/quality/check-tracked-artifacts.ts→git ls-files packages/vm-agent/vm-agentand filesystem presence check..github/workflows/deploy-reusable.yml→make -C packages/vm-agent prepare-container/build-all→packages/vm-agent/Makefilewritesbin/vm-agent-*andapps/api/container-artifacts/vm-agent-linux-amd64→ R2 upload or container Dockerfile copy. No path usespackages/vm-agent/vm-agent.Untested Gaps
-racesuite could not complete without Docker in this workspace; GitHub CI VM-agent jobs provide Docker and are the authoritative check for those docker-dependent tests.Post-Mortem (Required for bug fix PRs)
What broke
A historical VM-agent binary artifact was committed at
packages/vm-agent/vm-agent, increasing repository size and creating a stale executable artifact in source control.Root cause
Historical build output was tracked at the package root even though maintained build/deploy paths produce artifacts under
packages/vm-agent/bin/andapps/api/container-artifacts/.Class of bug
Tracked generated artifact / source-control hygiene issue.
Why it wasn't caught
Existing ignore rules covered
packages/vm-agent/bin/and container artifacts, but not the exact stale root binary path, and CI had no guard for this artifact.Process fix included in this PR
.gitignore: ignores/packages/vm-agent/vm-agent.scripts/quality/check-tracked-artifacts.ts: deterministic guard for the exact stale artifact path.scripts/quality/check-tracked-artifacts.test.ts: tests tracked and untracked reintroduction cases..github/workflows/ci.yml: runs the guard in Code Quality Checks.Post-mortem file
tasks/active/2026-08-01-remove-stale-vm-agent-binary.mdSpecialist Review Evidence (Required for agent-authored PRs)
If local subagents were used during Phase 5, list every reviewer below. Do NOT merge until every row shows PASS or ADDRESSED. If any reviewer could not complete (timeout, workspace killed, error), you MUST add the
needs-human-reviewlabel and stop — do not self-merge. See.claude/rules/25-review-merge-gate.md.needs-human-reviewlabel added and merge deferred to humanExceptions (If any)
Agent Preflight (Required)
Classification
External References
N/A: no external API/library behavior change.
Codebase Impact Analysis
Affected files:
packages/vm-agent/vm-agent: removed stale tracked binary..gitignore: targeted ignore for the stale root VM-agent artifact.scripts/quality/check-tracked-artifacts.tsand.test.ts: new quality guard and tests.package.jsonand.github/workflows/ci.yml: CI wiring for the guard.Documentation & Specs
N/A: no public behavior or user-facing documentation change. Task tracking file added under
tasks/active/.Constitution & Risk Check
Checked Principle XI / hardcoded values: the only blocked artifact path is intentionally hardcoded as the exact stale artifact path named in the task. Risk is limited to local developers who create
packages/vm-agent/vm-agent; the guard will ask them to remove that obsolete root binary while preserving supportedpackages/vm-agent/bin/outputs.