Skip to content

release: v0.13.12 — bug batch, migration guard, scoped review fingerprint, types drift gate - #80

Merged
mai1015 merged 32 commits into
mainfrom
release/v0.13.12
Oct 1, 2026
Merged

mai1015 merged 32 commits into
mainfrom
release/v0.13.12

Conversation

@mai1015

@mai1015 mai1015 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Bundles the 9/30 bug batch and the first three refactor quick wins (plan Phase 0 / 1A). Full notes are in CHANGELOG.md under 0.13.12.

Breaking

  • RepoResponse.remote_url can be null; CreateRepoRequest.remote_url is optional; PATCH remote_url: null clears the remote.
  • GET /projects/{id}/tasks and forge-ctl task list --output json return compact items (no description, plan, workspace, evidence, usage). Read those from the Task detail.

Changed

  • Provider unavailability now spends the execution retry budget.
  • Migrations after V149 use UTC timestamp versions (VYYYYMMDDHHMM__name.sql).
  • TS bindings have one output dir (web/src/types/generated/bindings), make types regenerates them, and CI fails on drift. .cargo/config.toml is tracked.

Fixed

  • Migration runner refuses duplicate versions and a version applied under another name (it used to skip the second migration silently).
  • Editing a Project setting no longer forces a fresh review of every approved Task (scoped review fingerprint v2; v1 approvals still verify the old way).
  • Readiness for local-only repos with no remote.
  • Task-list polling no longer pins the CPU.
  • Usage/rate limits move to the fallback executor or schedule a retry.
  • Recovering a Task whose agent is at capacity queues the recovery (was 409).
  • Session state: no-op saves skipped, compressed, not stored twice.
  • Worktrees and managed Codex homes of done/cancelled Tasks are cleaned up.
  • Outbox entries are no longer dropped silently; review-CI routing; deleted-worktree recovery.

Migrations

  • V202609302222__normalize_repo_remote_url.sql
  • V202609302227__protected_session_snapshot_digest.sql

Upgrade note

A host that ran a hand-deployed build may be refused at startup by the new migration guard. Check SELECT version, name FROM _migration WHERE version >= 146 first; the recovery steps are in the changelog and docs/architecture.md.

Verified locally

make types (no drift), cargo fmt --check, workspace clippy, focused db/services/api tests for each fix, happy_path, web typecheck, lint and vitest (144 tests).

🤖 Generated with Claude Code

mai1015 and others added 30 commits September 30, 2026 18:30
- A system (non-user) entry into review whose run_ci_steps check fails
  now settles like any failed review: back to the coder with the review
  retry budget spent, or the review_budget_exhausted blocker. Before, the
  Task stayed in review with a failed Review and nothing dispatched it.
  The dispatcher also routes a Task left on a failed latest Review after
  a two-minute grace. User moves into review keep today's behavior.
- The review rerun and the review conformance runner recover a deleted
  Task worktree from its branch before running checks, like executor
  dispatch already does, instead of failing with os error 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Accept pretty-printed or concatenated JSON objects in .jsonl outbox files,
treat a replayed worklog/evidence idempotency key as already ingested
instead of a UNIQUE constraint error, and map custom evidence kinds to
other while keeping the agent's label. Agent prompts now state one JSON
object per line and list the supported evidence kinds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A passed review contract fingerprinted the whole Project settings and
workflow blobs, the reviewer assignment, and worklog and media rows, so
editing any Project setting voided every approved-but-unmerged review in
the Project and forced a full reviewer turn. New contracts (v2)
fingerprint only review authority: the charter revision and digest, the
Task scope, plan, requirements and allocations, linked document
revisions, the effective review config, the review state's config, and
Project environment variable names (never values). Contracts frozen
before this change keep verifying with the original v1 digest, so the
upgrade triggers no re-reviews.

Co-Authored-By: Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ts-rs wrote bindings into crates/api-types/bindings (593 files) while the
web client used a hand-copied set under web/src/types/generated/bindings
(604 files, 58 differing). `.cargo/config.toml` now points
TS_RS_EXPORT_DIR at the web directory, the crate-side copy is deleted,
`make types` regenerates, and CI fails when committed bindings drift.
Three stale web-only enums with no Rust source or importers are removed.

`.cargo/config.toml` is now tracked; a local agent-runtime [patch]
override belongs in ~/.cargo/config.toml or a parent directory's
.cargo/config.toml instead.

Co-Authored-By: Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The runner treated a migration as applied when its version number was in
`_migration` and never compared the stored name. Two branches that both
added V149 left one silently skipped, and a host that had applied a
different V149 from a hotfix build never got the release's schema.

The runner now refuses to start, before applying anything, when two
bundled files share a version or when the database applied a different
migration under a version the build uses. The known V053
`integration_credentials` row from early hosts, which V054 reconciles,
is accepted. Migrations after V149 use UTC timestamp versions
(VYYYYMMDDHHMM) so parallel branches cannot collide; a unit test
enforces it. The applied set is read once instead of one query per
migration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	crates/api-types/bindings/ReviewGoverningContext.ts
#	web/src/types/generated/bindings/ReviewGoverningContext.ts
`forge-ctl repo create --kind local` saved an empty remote URL, and
milestone readiness rejected every Task in that Project as having
incomplete repository context, so the Project Agent burned its wake
budget retrying. A blank or whitespace-only remote is now normalized to
null on the CLI, API, DB create/update, row mapping, readiness context,
evidence context and Project Agent workspace identity. A migration
rebuilds `repo` with a nullable `remote_url`, converts blanks to NULL and
keeps every repository and reference.

Breaking: `RepoResponse.remote_url` may be null,
`CreateRepoRequest.remote_url` is optional, and PATCH with
`remote_url: null` clears the remote.

Co-Authored-By: Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Polling GET /projects/{id}/tasks ran Git, agent-health and usage checks
for every non-terminal Task (about 290 ms for 20 tasks, 6 KB per task).
The list is now built from a few batched queries per page and returns
compact items; detail content stays on the Task detail endpoint. Request
logs include the client socket address and a bounded X-Forwarded-For
value on the request span.

Audit fixes: the web list type now lives in api.ts as TaskListItem and
TasksResponse points at it; the parent and dependency pickers use it;
the parallel task-list.ts type is removed.

Breaking: list items no longer include description, state config,
workspace, plan, execution actions/evidence/blocker, or usage
observability.

Co-Authored-By: Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…is hit

A provider usage or rate limit (Codex, Claude Code, Gemini, HTTP 429)
failed the Task outright. Adapters now report it as usage exhaustion, so
the agent's fallback chain moves to the next executor; with no fallback,
Forge schedules a retry at the provider's reset time (at most six hours
away) or after a cooldown, and blocks only when execution retries run
out.

Audit fixes: 429 counts only in an HTTP/status context or an explicit
status/code field, never in token counts or costs; Claude checks the
error text only; Codex ignores willRetry notifications and stderr; a
Gemini run that exits cleanly stays successful; Codex reset times parse
in both date-first and time-first forms; decline messages name the real
reason.

Changed: provider unavailability now spends the Task's execution retry
budget.

Co-Authored-By: Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Forge never removed the worktree or `.codex-managed-home` of a done or
cancelled Task. Cleanup now runs through Git from a background worker
that checks, under the lifecycle lock, that the Task is terminal and has
no running execution or lease. A periodic sweep cleans older Tasks and
retries failures with backoff; the branch and logs are kept.

Audit fixes: transitions only schedule cleanup and never wait on or fail
from deletion; ineligible rows no longer fill the sweep batch; Forge
removes only its own worktree path and prunes only its `.repos/` caches,
never a user's repository registrations; cancelled Tasks keep the
24-hour grace period.

Co-Authored-By: Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Recovering a Task whose agent or daemon was full returned
409 agent_at_capacity. The recovery is now queued: the request returns
200 with the Task marked "Retry Queued", and the dispatcher replays it
when a slot frees, keeping its reason, guidance and session.

Audit fixes: a replay that fails permanently before claiming (agent
deleted, role unassigned, no interactive agent) removes the queue marker
and restores the saved blocker with the error; only the replay's own
execution consumes the marker, and a competing execution restores the
blocker instead of erasing the intent; a second recover call returns the
queued Task; the Resume fallback launch queues too; paused or offline
agents return their own errors instead of queueing.

Co-Authored-By: Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… step

A long agent session rewrote a ~16.7 MB encrypted snapshot plus a second
~16.7 MB checkpoint on every transition (about 100 GB of churn on one
host), and the attention consumer upserted its health row per event.
Saves that change nothing are now skipped by a keyed digest, saved state
is compressed, and the snapshot is no longer stored twice next to its
checkpoint. Sessions saved by earlier versions still load. Consumer
health is buffered: counts stay exact and idle polls write at most every
five seconds.

Audit fixes: the unrelated LCM policy changes are reverted (they would
have dropped LCM state for every live session on upgrade); snapshot and
checkpoint save races are resolved at the store instead of failing a
turn; a checkpoint that cannot be decoded fails with an error naming the
session; the digest is an HMAC with the store key; the migration uses a
timestamp version.

Co-Authored-By: Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	crates/db/src/migration.rs
Co-Authored-By: Claude Opus 5.5 <[email protected]>
mai1015 and others added 2 commits October 1, 2026 01:21
…markers

Two tests still asserted behaviour this release changes:
- provider unavailability now spends one execution retry;
- the protected store keeps a checkpoint save with an unchanged turn,
  revision and fingerprint as a replay, and tracks the LCM policy marker
  for the snapshot and the checkpoint separately, so the test's emulation
  of another binary's state has to rewrite both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The services lib test binary aborted on Linux CI with a stack overflow in
dispatcher_dispatches_pre_repository_task_after_primary_repo_is_attached, so
the tests after it never ran. The server already runs its runtime threads with
16 MiB for the same deep futures; tests now get the same through cargo's env.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mai1015
mai1015 merged commit e04a1f0 into main Oct 1, 2026
6 checks passed
@mai1015
mai1015 deleted the release/v0.13.12 branch October 1, 2026 18:39
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.

1 participant