Repository navigation
Conversation
fix(signals): end the bash 5.2 ctrl-c hang; isolate the anonymous kit fetch
…o 85 Main now has its own section 84 (the Bash 5.2 Ctrl-C hang), so the Windows forced-kill session section becomes 85. Nothing referred to it by number. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
msb records the workspace in the native host form, which under Git Bash is drive form (C:/...). The re-attach check treated it as a relative path, so a sandbox created on a directory holding acq's state was never refused there. Convert drive-form and UNC records with cygpath -u before the comparison. Refs: mogul/agentic-coding-quickstart#112 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
…e restored A SIGTERM arriving after the session child exited, while run_foreground was putting its signal handlers back, raised out of the restore as a traceback instead of ending acq with 143. The restore now catches it and acq ends by that signal as if it had come during the wait; the handlers are also recorded before they are replaced. Ctrl-Break on Windows now goes through cli's terminate path like SIGTERM and SIGHUP, so it unwinds any command, a session included, with cleanup and exit 149 and no --json envelope. The README and KNOWN_FAILURE_MODES section 85 say so. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
exclusive_lock opened the secret-store writer marker before its try block, so a marker that could not be opened leaked the lock file's handle and surfaced as a raw OSError. The marker is now opened inside the try and a failure is raised as the lock's timeout class, which every caller already reports fail-closed. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
A Bash config.yaml kit_sources entry carrying a credential (https://user:TOKEN@host/... or user:TOKEN@host/...) that failed to parse was quoted raw in the import warning, which is printed, kept in the generation marker and shown by acq doctor on every run, --json included. The parse errors now quote redacted values, every warning is redacted when raised, and the marker's warning text is redacted again when written and when read, so a marker left by an older acq is safe too. The write_generation docstring no longer claims the warnings never hold a secret. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
The local kit copy recursed once per directory level with no limit, so a very deep tree raised an uncaught RecursionError (a traceback, no --json envelope). Nesting deeper than 64 levels is now refused like any other unacceptable tree. On Windows each file the path-based walk opens must also resolve, by GetFinalPathNameByHandleW on its handle, to a path under the kit, closing the window where a directory swapped for a junction after it was listed led the copy outside the kit. Payload files are opened with O_NOCTTY as well. KNOWN_FAILURE_MODES section 55 and the README say so, and section 55 notes the hard-link limitation the Python and Bash acq share. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
The stop sent TERM and gave up after about two seconds. An animator not scheduled for that long could be past its checks with the TERM pending and draw one more frame over an attached session. The animator now draws only while holding an mkdir draw lock and only when no stop marker exists; the stop sets the marker and returns only once it holds the lock or the animator is gone. Without a private directory for the lock the spinner degrades to a status line. Refs: mogul/agentic-coding-quickstart#112 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
The anonymous kit fetch widened its https-only allowlist when ACQ_TEST_KIT_ANON_PROTOCOLS was set under bats. The end-to-end test now reaches its local file:// repository through a git wrapper on PATH that swaps only that allowlist value, so production code carries no test hook. A new test pins that no variable widens the allowlist. Refs: mogul/agentic-coding-quickstart#112 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
Refs: mogul/agentic-coding-quickstart#112 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
On Windows 64 directory levels under the kit cache exceed MAX_PATH before the cap is reached, so the copy fails as a plain error first. The depth test lowers the cap to 8 there; it still checks the refusal on both walks. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
… values A malformed provider_credential_bindings entry was quoted whole in its import warning, which is printed, kept in the migration marker and shown by acq doctor, so a key pasted where the env var name belongs was repeated on every doctor run. The same held for a kit_sources entry that is not in URL form, and for a recorded relative kit path. These refusals now quote only parts with the expected shape (a provider id, an env var name, a host name, a normalized repository, a plain path), put '<redacted>' in place of anything else, and name the entry by its position in the list. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
The Bash-state import quoted a kit-source ref raw in 'ref ... is not a full commit SHA', and the ref grammar admits token-shaped strings (github.com/acme/kits@ghp_...). The warning can be kept in the migration marker and shown by acq doctor. A ref is now quoted only when it plausibly is a branch, tag or short commit (at most 40 characters, not starting like a common GitHub, GitLab, OpenAI-style or Slack token); otherwise it is '<redacted>'. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
A signal handled at a function entry or a loop back-jump outside the try that catches _SessionSignal (installing or restoring the session handlers) could still escape as a traceback. _session_signal now raises only while _wait_session is inside that try (a module flag set around it); anywhere else it records the signal, and once the handlers are back acq ends by it the normal way (128+N). The restore loop no longer needs to catch anything. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
…rted When cygpath is missing, fails or prints no absolute path, a drive-form record fell through as a relative path and passed the re-attach check. It is now refused with the remove-and-recreate remediation. Refs: mogul/agentic-coding-quickstart#112 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
The stop cleared the spinner directory before its wait, so a signal during the wait re-entered through the trap and returned at once. The state is now cleared after the wait, and the re-entered stop knows when the lock is already held. The wait for the lock is capped at about 30 s for an animator suspended while holding it. The animator is no longer sent TERM: it quits at its next check once the stop marker is set, so the wait no longer needs stderr on /dev/null, which had also hidden the output of a trap that ran during it. The directory is removed when no animator was started. KNOWN_FAILURE_MODES section 84 now separates the 120-run measurement from the draw-lock change. Refs: mogul/agentic-coding-quickstart#112 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
…msys On Git Bash and Cygwin the workspace checks compared paths case-sensitively, so a workspace or recorded workspace that spelled one of acq's own directories in another case passed both the create-time and the re-attach check, although NTFS treats it as the same directory. _acq_path_within now folds ASCII case on MSYS/Cygwin; POSIX hosts still compare exactly. The Python check already folds case on Windows through os.path.normcase; tests now pin that. KNOWN_FAILURE_MODES section 81 describes the case rule and the drive-form record conversion. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
fix(py-acq): session signals, lock fairness, local kit copy and doctor import check
…back Add two cli vectors under the "kit-source add/rm both refuse the control-plane trust anchor" contract: rm of the pinned repository and of a case variant. Each seeds the registry with the spelling it removes, so an rm that skipped the refusal (or compared exact spellings) would remove it and exit 0 instead of failing with validation_failed. Add a pytest where sbx takes the kit.allowedSources write but the re-read lists only a case variant of the removed owner prefix; the revocation must fail closed. Refs: mogul/agentic-coding-quickstart#156 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
A relative ACQ_MSB_STARTUP_STAGE_DIR resolved against the current directory, normally the agent-writable workspace, so the kit startup script was staged there. Add it, with ACQ_SBX_KIT_CACHE and ACQ_MSB_KIT_CACHE (refused only when used until now), to the per-path overrides checked before any verb runs, with the shared "<VAR> must be an absolute path" text and remediation Bash prints. Staging itself also refuses a relative value and writes nothing. Refs: mogul/agentic-coding-quickstart#156 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
Port Bash _acq_msb_check_prereqs. Before the agent-user setup on every msb kit-set apply (create, recreate, start, re-attach heal, kit update), probe the guest as the image's default user for node, git, curl and update-ca-certificates, and warn naming any that are missing, since acq never installs them (kit egress rules lock the sandbox to the kits' hosts). ACQ_MSB_SKIP_PREREQ_CHECK skips it, as in Bash. The probe prints one tagged line and only that line is read, so output that is not its answer (a failed exec, an echoed command) is never reported as a missing tool. Bash runs the check at provision only; Python runs it wherever it runs the agent-user setup. Refs: mogul/agentic-coding-quickstart#108 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
The autouse isolation fixture now sets ACQ_SANDBOX_LOCK_TIMEOUT (which also bounds the provider-credential and secret-store locks) to 30 s and Bash's ACQ_PROVIDER_INPUT_LOCK_RETRIES to 30, instead of the shipped 300 s and 300 retries. A lock that is never released, such as the concurrent create/rm case, now fails its test in seconds instead of hanging the run for five minutes. Tests that measure waiting set their own value, which still replaces the default. Refs: mogul/agentic-coding-quickstart#109 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
On Windows, taskkill /F of the Python acq during attach, shell, exec or run left msb.exe exec or sbx.exe exec running in the console. The session child now runs in a kill-on-close Job object (the StepJob that bounded backend calls already use). It is created suspended and resumed once it is in the job, and the job is released when the child exits, so a process it left running on purpose survives. Where no job can be made, the session starts plainly, as before. The SIGTERM, SIGHUP and SIGBREAK handlers are now installed before the child starts. A signal that lands while the child is being started is recorded, the child is ended as soon as it exists, and acq then ends by that signal. Before, such a signal went to the previous handler and left the child running. A Ctrl-Break that came before the child existed never reached it, so the child is ended for that one too. Checked on a Windows 11 VM with msb 0.7.7 and a real guest: taskkill /F now ends msb.exe exec (main left it running); the PTY, Ctrl-C and Ctrl-Break still behave. KNOWN_FAILURE_MODES section 85 is marked fixed and records the trade-off for sbx. Refs: mogul/agentic-coding-quickstart#112 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
The userdirs import added for the startup stage dir check left the import line longer than ruff's isort rule allows. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
Bash 5 runs the spinner's INT/TERM trap again for a second signal during the first one's wait for the animator. The nested run found the prior handler already taken, ran only the EXIT cleanup and re-raised, so the provisioning subshell's interrupt handler never ran and the lock could be released while a backend child was alive. A nested run now returns and the outer one finishes. The stop also sends TERM when it cannot write the stop marker, and the animator cleans up on HUP as on TERM. Refs: mogul/agentic-coding-quickstart#112 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
The case-insensitive workspace comparison forked two printf|tr pipelines per comparison, which made the checks about four times slower under Git Bash. Each path is now folded once, with the Bash 4 ,, expansion (a tr fallback remains for an older Bash on Cygwin), and the comparisons themselves fork nothing. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
…rites Python serializes config.yaml read-modify-writes with an OS advisory lock on <state>/locks/config.lock (fcntl.flock, msvcrt.locking), and Bash _acq_config_write_field took no lock at all, so a Bash and a Python acq changing different keys at once could lose one change. Bash 3.2 cannot take that OS lock portably (no flock(1) on macOS; Git Bash locks are not msvcrt's), so both implementations now also share a mkdir lock beside it, <state>/locks/config.lock.d. Python takes it while it holds its OS lock (lock.ConfigDirLock, refactored with the per-sandbox lock onto one mkdir-lock base); Bash takes it around every config write. The owner file holds "PID IDENTITY" with the per-sandbox lock's stale-owner rules on POSIX. On Windows neither side can check the other's PIDs, so both count the directory as held for 60 seconds and recover it after that. The wait is ACQ_MIGRATION_LOCK_TIMEOUT for both. Verified both directions on Windows (Git Bash and native Python). A lock directory with no owner file is never removed automatically. Every timeout that names one (config lock in both implementations, the Python sandbox-lock timeout, Bash's provider-input lock when it gives up or finds no owner) now prints the command that removes it, and KNOWN_FAILURE_MODES section 79 and docs/howto/acq.md document it. Bash's provider-input lock also stopped with "pid: unbound variable" on an owner-less lock under set -u instead of reaching its message; that is fixed. The new bats file joins the Windows Git Bash subset. Refs: mogul/agentic-coding-quickstart#109 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
…shell Both implementations encrypt with DPAPI through Windows PowerShell 5.1, passing the value on stdin and the result on stdout. PowerShell decodes and encodes those pipes with the console code page, so a non-ASCII value was altered: under code page 932 it came back wrong, and a value stored under one code page read back wrong under another. Checked on a Windows 11 VM. Under the default 437 it round-tripped by accident, but DPAPI did not protect the value's UTF-8. Both one-liners now take base64 of the value's bytes and return base64, so only ASCII crosses the pipes. Python and Bash stay byte for byte the same. The fakes now speak the same protocol and fail on anything that is not base64. New tests cover awkward values (quotes, backslashes, $, backticks, non-ASCII) on POSIX, and on Windows the real DPAPI path, both implementations and a console code page change. A non-ASCII secret stored by an earlier build has to be set again (KNOWN_FAILURE_MODES section 86). Refs: mogul/agentic-coding-quickstart#107 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
Test-ProcessAlive converted every numeric suffix with an Int64 cast, so one oversized leftover name aborted the sweep and every later run with it. TryParse makes an unrepresentable suffix simply "not alive", keeping the existing Int32 range guard that Get-Process needs. The marker publish used Move-Item -Force, which deletes the destination before it moves on Windows. A sharing violation on the freshly written temporary marker therefore destroyed the previous marker and left the directory unmarked, which the next run refuses as someone else's files. Use File.Replace when a marker exists and File.Move for a first install; both fail closed with the old marker intact, and the failure is reported as "could not write". The sweep now captures $Matches into a local before calling Test-ProcessAlive. Add pwsh-gated regression tests: oversized PID suffixes, a failed marker rename, PID 1 leftovers, and first-install and marked-install lookalikes. The own-PID sweep case is deliberately not ported: Windows always gives the installer a new PID, so there is no equivalent handoff. Refs: ADR-0042m
A failed marker replace wrapped a .NET call, so the operator saw "Exception calling Replace with 3 argument(s)" instead of the cause. Throw the inner exception message when there is one; the marker path and the fail-closed behaviour are unchanged. The note explaining why the own-PID sweep case is not ported claimed the exclusion was covered by a static assertion, which it is not, and gave a wrong reason. State that Windows has no way to hand a chosen PID to the installer and that the `-eq $PID` clause is the one bash case with no Windows test. Refs: ADR-0042m
fix(install): make install.ps1 marker publish atomic and sweep PID-safe
Verify the host-side read-only trusted-config mount record and msb version floor before binding stopped-added credentials on start, and skip the POSIX read-only mount check on Windows where acq never requests the mount. If msb start fails after pre-boot reconciliation, if waiting for exec-readiness times out, or if the guest-side mount probe contradicts the host record after boot, revoke the bindings added by that start with --secret-rm while keeping existing rotations bound. Refs: ADR-0035, ADR-0038m, mogul/agentic-coding-quickstart#107 Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
fix(msb): bind stopped-added credentials before start; report new-binding limits honestly
…T205733Z chore(qualification): record linux-x86_64 msb live runs
Aligns user guides, ADRs, failure modes, and the handoff guide with the completed Python CLI parity, release-asset publishing/signing workflows (ADR-0050m), installer provenance/marker checks, and the current msb/linux-x86_64 live Tier-3 qualification ledger state. Adds a step-by-step upstream migration and post-merge checklist to docs/UPSTREAM-HANDOFF.md and promotes ADR-0038 and ADR-0039 frontmatter and index entries to accepted. Co-authored-by: AI-assisted <william.zujkowski@gsa.gov>
docs: remove vestigial claims and add upstream migration checklist
Integrate the acq-owned SBX base kit and MSB shell-image changes, including custom-image OpenCode launch-mode and provider-input regression fixes. Isolate MSB qualification state, preserve BLOCKED verdicts, and keep cleanup permission repairs inside the private tree without following links. Leave unreadable directories for explicit cleanup instead of raising from an invalid directory-open retry. Replace clone-mode remote removal with no-dereference ref updates and local configuration removal, avoiding Git 2.43 reference-transaction hook execution despite a command-scope hooksPath override. Preserve local branches behind symbolic fetch-back refs. Clarify upstream governance scope. Source: mogul/agentic-coding-quickstart#248 at 6ba8f32 and mogul/agentic-coding-quickstart#251 at 8c13759. AI-assisted. Co-authored-by: Bret Mogilefsky <bret.mogilefsky@gsa.gov>
Apply no-deref to the whole update-ref batch in both implementations. Cover an ordinary remote ref followed by multiple symbolic refs and preserve every local target. Clarify the bounded cleanup contract and base-kit launch documentation. AI-assisted.
Record exact Gitleaks fingerprints for five offline fixture findings. Preserve scanning for all other commits, paths and rules.
Merge upstream main at 3672239, preserving accepted ADR-0037. Classify the secret-scanner fingerprint file as a non-input in Windows and Bash relevance inventories. Positive suites and unknown-file negative controls pass. AI-assisted.
Avoid text-mode CRLF translation in the Git update-ref input protocol. Retain atomic batch deletion and command-wide no-deref protection, with a regression that simulates Windows text-pipe translation. AI-assisted.
Combine the independently reviewed NUL-delimited clone cleanup with the upstream-sync and relevance-inventory repair. Native Windows confirmation remains a hosted CI check. AI-assisted.
`python -m qualification.host` pushed only to a personal fork and hardcoded the whole GSA-TTS organisation as off-limits. With the fork retired and main upstream, no remote was valid, so a run could not be recorded. The default publish remote is now the one whose every fetch and push URL is GSA-TTS/agentic-coding-quickstart (normally origin); a personal fork is still accepted with --remote. Kept: only a new chore/ledger-* branch is ever pushed, never main or a tag; all URLs of the remote must name one github.com repository; any other GSA-TTS repository is refused; HEAD must be on that remote's main. The URL patterns are now anchored, so a look-alike such as evil.example/github.com/GSA-TTS/... or an http://, git:// or file:// URL is not taken for GitHub, and refusal messages no longer echo URL credentials. The PR body's verify hint names the remote used. Also: the end-to-end msb oracle tests skip when /tmp has too little free space instead of failing, and the unit tests no longer depend on it. ADR-0044m gets an amendment, still proposed; it needs the maintainer's acceptance before merge. Pushing branches to upstream is a policy decision recorded in docs/UPSTREAM-HANDOFF.md.
|
macOS arm64 local check of the carried-over fixes (not qualification evidence) This was a local check, run on the maintainer's Mac, that the earlier fork fixes still work on this branch and that the qualification script runs locally. It is not Tier-3 qualification and is not recorded anywhere. The real qualification runs will be posted once this is on
What it showed:
Limits: these were direct oracle runs, so there is no AI-assisted. |
|
☝️ That follows the two commits just pushed prior: The qual script was written to work in the I think we need to start an explicit checklist based on stuff in the |
Accepted by the maintainer (2026-11-16), as AGENTS.fork.md requires before merge.
Summary
Import the Python acq implementation and cross-platform installer, runtime,
backend, and qualification work developed in
mogul/agentic-coding-quickstart.This draft provides an upstream branch for CI, native-platform testing, and
integration review before a separate merge decision.
Includes acq-owned SBX base kits, matching MSB shell images, custom-image OpenCode
launch handling, private MSB qualification state, bounded cleanup, and Python/Bash
clone-removal repairs that suppress Git 2.43 reference-transaction hooks and
preserve local targets of symbolic tracking refs. Historical fork permissions
are explicitly scoped away from upstream.
Related Issues
Source work: mogul/agentic-coding-quickstart#248 at
6ba8f3226682df58c2c913c066ac69f7104d6884andmogul/agentic-coding-quickstart#251 at
8c137592ad3e68ba7185cb15a7d971a4e251b1e2.This PR requests no issue closures.
Type of Change
Checklist
Test Results
Local Ubuntu 24.04 ARM64 / Python 3.12.3, unprivileged execution with external
networking disabled:
05b4d90b67a4cd745cf023de97d42f1c92b8fc2f; identified multi-ref defect fixed and re-reviewedThe full-suite run preceded small follow-up changes; those changes received the
targeted and managed-hook checks listed separately. Six Python skips require
the pinned provider validator dependencies; other skips include platform-specific
and backend-specific cases. These results do not establish native macOS/Windows
or live Tier-3 qualification. The original large import has not received a new
comprehensive independent review.
Additional Notes
Before merge
or reference revisions outside this branch's ancestry; the Tier-3 gate is
expected to remain red until evidence is reconciled. Original transcripts
have not been relabeled as new results.
no issue-closure authorization is requested here.
docs/KNOWN_FAILURE_MODES.mdand the upstream handoff guide.Rollback and security impact
This branch changes no upstream default-branch settings and requests no release
or deployment. Before merge, stop testing and remove only test-owned resources.
After any separately approved merge, rollback requires a reviewed revert with
attention to state-migration and installer compatibility.
The import changes host-side credential, filesystem, subprocess, installer and
backend boundaries. Offline coverage and incremental security review support
draft testing, not production or live-platform certification.
AI-assisted preparation, integration repairs, validation, and independent review.
Original contributor credit is preserved in source history and integration commits.
Co-authored-by: OpenCode