Skip to content

chore: harden automation and upstream verification#5

Merged
yaacovcorcos merged 1 commit into
mainfrom
agent/automation-hardening
Jul 18, 2026
Merged

chore: harden automation and upstream verification#5
yaacovcorcos merged 1 commit into
mainfrom
agent/automation-hardening

Conversation

@yaacovcorcos

Copy link
Copy Markdown
Contributor

What changed

  • makes ordinary product CI validate source topology without failing merely because official Synara moved
  • adds --require-reviewed-tip as an honest strict review-closeout mode while retaining --review-check as a strict compatibility alias
  • adds real temporary-Git-repository coverage for valid and invalid review/integration ancestry
  • adds negative coverage for wrong remotes, writable upstream, missing commits, and stale review checkpoints
  • pins every external GitHub Action workflow dependency to a full reviewed commit SHA
  • adds weekly Dependabot updates for pinned GitHub Actions

Why

The previous --review-check mode calculated unreviewed commits but did not enforce review currency, while ordinary CI invoked that ambiguous mode. Write-capable and release workflows also used mutable major-version action tags, including a third-party action under pull_request_target.

Impact

Product CI remains healthy when upstream publishes new optional input. A disposition-review closeout now has a strict command that fails until reviewedThrough equals the fetched official tip. Workflow dependencies are immutable at execution time and remain maintainable through Dependabot.

Validation

  • focused upstream verifier suite: 9 tests passed
  • strict reviewed-tip check passed against the fetched official tip
  • Scient identity check passed
  • full formatter check passed
  • full lint completed with 0 errors (pre-existing warnings remain)
  • all 9 workspace typecheck tasks passed
  • all workflow and Dependabot YAML parsed successfully
  • no mutable action refs remain under .github/workflows/
  • git diff --check

@github-actions github-actions Bot added size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 18, 2026
@yaacovcorcos
yaacovcorcos marked this pull request as ready for review July 18, 2026 11:55
@yaacovcorcos
yaacovcorcos merged commit 91b38b1 into main Jul 18, 2026
8 checks passed
@yaacovcorcos
yaacovcorcos deleted the agent/automation-hardening branch July 18, 2026 11:55
yaacovcorcos added a commit that referenced this pull request Jul 26, 2026
…findings

Ensure the provider updater child process is only ever spawned against a
target that was probed, certified, and re-validated under the settings write
lock, closing six concurrency/security windows in the confirmed-update
boundary:

- #1 Immutable probe/settings snapshot threaded through refresh; a single
  serialized refresh (refreshSemaphore) captures one snapshot and
  revalidates confirmed targets at the commit boundary.
- #2 updateProvider re-validates the confirmed target and captures the exact
  updater command into immutable locals while holding withSettingsWriteLock,
  so a concurrent settings write cannot change what gets spawned between
  validation and capture. The child is spawned OUTSIDE the lock (spawn + await
  share one update-timeout budget), so a slow or hung spawner.spawn — whose
  acquire is uninterruptible — can only stall its own request and can never
  pin the global settings write lock.
- #3 Request-owned update state (per-request owner token); a losing
  duplicate cannot clobber the in-flight update's running state.
- #4 Interruption-safe cleanup lands a terminal failed state and kills the
  child via a scoped finalizer.
- #5 Hot getStatuses/stream reads re-derive only a cheap authority key
  (revision counters) instead of the full maintenance context, so reads
  never re-probe CLIs or re-resolve the runtime.
- #6 Runtime target identity tracked by a monotonic per-provider revision
  counter (ProviderRuntimeManager.getRevision), excluded from transient
  install-progress churn; PROVIDER_KINDS derived from ProviderKind.literals.

Adds deterministic regression tests for each finding (no sleeps; barriers via
Deferred / TestClock.withLive / scheduler drains), including a mutation-
sensitive hot-read guard, a mutation-sensitive guard that the settings write
lock is released before the unlocked spawn, a hung-process timeout guard,
succeeded/unchanged post-update re-probe guards, and a per-provider
revision-isolation test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant