Repository navigation
fix(autopilot): harden Runtime PR sync, sandbox skips, job cleanup, and offline net/credit guards - #3420
Merged
Conversation
…oncurrency, and offline/credit guards
…-and-engine-hardening
…cks, credit guards, and npm test net guard
…ession-isolation.test.mjs
Merged
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.
Follows #3419
Lines changed:
+1,413 / -125across24files.What is implemented
Runtime:parsing and automatic synchronization (src/autopilot-core.mjs,prompts/cli/autopilot-core.prompt.md):runtimeVerdictsso prose lines that start withRuntimewithout a colon (for example,Runtime errors are caught...) are never parsed as malformedRuntime:verdict lines.Runtime:verdict lines (andEvidence:runtime=state) from Autopilot's saved runtime verification state when updating PR descriptions, while still requiring the underlying saved runtime checks to pass.real-binding-unavailablehandling (src/autopilot-core.mjs,prompts/cli/autopilot-core.prompt.md):real-binding-unavailable(zero provider calls when no live binding exists in the local sandbox) as local skips rather than author refusals or runtime coverage losses, while verifying every test of a multi-test Story has a passing or skipped/service deciding check so unrun sibling tests are never excused.client_adviceinto coding-agent repair prompts so worker runs focus on real code, test, and lint failures instead of stopping with falseneeds-personaborts.src/agent-job.mjs,src/autopilot-core.mjs, owning prompts):pspolling interval from250ms to2000ms and deduplicates and bounds captured process manifests to512entries.cleanupAgentJobinstead of latching.processes.errorforever (including when prior retryable snapshot attempts recordedwrapper: null, failing closed on resolution write errors, and skipping-job.pidgroup collection, liveness probes,SIGTERM, andSIGKILLwheneverjob.pidhas been recycled to an unrelated process withoutjob.token).node --testconcurrency (--test-concurrency) toMath.max(1, Math.min(6, shareCpus))whenshareCpusis configured viaports.machineorports.env.PDD_CHECK_CPUS(or directly on anode --testcommand).package.json,test/helpers/test-net-guard.mjs,src/login-pool.mjs,src/agent-adapters.mjs,src/autopilot-launcher.mjs,.github/workflows/ci.yml,scripts/vm-suite.sh, owning prompts):test/helpers/test-net-guard.mjsand loads it via--importinpackage.jsonscripts.test, CI, andscripts/vm-suite.shto allow127.0.0.1,::1,localhost,0.0.0.0, and Unix domain sockets while blocking external network calls withERR_PDD_OFFLINE_TEST_NET_BLOCKEDunlessPDD_ALLOW_NET=1orPDD_LIVE_CANARY=1.selectCloudPoolLogin,selectPoolLogin,loadLoginPoolfallback normalization,runStepAgentProcess, andrunAutopilotLauncherstartup checks unlessallowCredits: trueis explicitly passed by a human CLI command.Generated from ...prompt headers across all touched owned files viapdd owner.What is tested
test/autopilot-hardening.test.mjs,test/test-home-isolation.test.mjs,test/agent-adapters.test.mjs,test/autopilot-launcher.test.mjs,test/autopilot-core.test.mjs,test/autopilot-core-evidence.test.mjs,test/autopilot-core-guard.test.mjs,test/autopilot-core-runtime-wait.test.mjs,test/agent-job.test.mjs,test/login-pool.test.mjs,test/cloud-accounts.test.mjs,test/file-owner.test.mjs,test/plain-prompts-and-frontmatter.test.mjs(0failures).pdd-vm):6,242 / 6,243(0failures,1skipped).