75 Commits
Author SHA1 Message Date
sam b25676b612 fix: check Docker conflicts, push errors and RPC status by type, not message text (#1923) 2026-11-13 03:47:34 +11:00
sam db346b159d fix(webui): mark cookies Secure behind a TLS proxy; run gosec in the gate (#1919)
Cookies took Secure from r.TLS, which is nil behind a proxy that terminates
TLS, so sign-in cookies went out without it. Every dashboard cookie now goes
through one builder that reads the scheme the way the origin check does.

The worktree reset and the agent worker's chown walk use os.Root, so a
symlink swapped in mid-walk can't point them outside the worktree.

gosec runs in golangci-lint, tests included. G104, G115, G204 and G304 are
excluded in config; each remaining finding is fixed or suppressed at the site
with its reason.
2026-11-13 03:16:15 +11:00
sam 20ffe63367 fix(worktree): object-not-found match tolerates a successful push
deploy / plan (push) Successful in 8s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 1m47s
2026-11-09 14:40:19 +11:00
sam a3fdbddfc0 fix(worktree): match object-not-found by message too, as push transports may flatten it (#1843) 2026-11-09 14:37:18 +11:00
sam 96236b6186 fix(worktree): rebuild the mirror and retry once when a push hits a missing object (#1843) 2026-11-09 14:37:17 +11:00
sam ec79c8123e fix(worktree): TestAwaitSpace recovery rows get a deadline a loaded host cannot run out 2026-11-09 14:27:18 +11:00
sam 561863613f feat(workflow): agent.run asks to continue when it reaches its step budget (#1832) 2026-11-09 09:41:46 +11:00
sam 8e5d4e8061 fix(worktree): rebuild the repo mirror when a refresh fails on a corrupt mirror (#1831) 2026-11-09 09:41:39 +11:00
sam c98666d6b7 fix(worktree): stale-clone reclaim keeps clones with uncommitted or unpushed work (#1829) 2026-11-09 09:41:33 +11:00
sam 055f2da9cd fix(daemon): reclaim stale task clones when the work volume is full; clean up dead tasks too (#1829) 2026-11-09 09:41:33 +11:00
sam fa76f4c994 fix(worktree): sign and attribute agent commits at push; forge git credentials (#1816, #1817)
deploy / plan (push) Failing after 7s
deploy / gate (push) Skipped
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
2026-11-09 00:11:54 +11:00
sam ac98b68bda feat(archied): connection commit identity and SSH commit signing (#1816)
deploy / plan (push) Failing after 2s
deploy / gate (push) Skipped
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
2026-11-09 00:05:32 +11:00
sam 52b5740c39 fix(daemon): cap tasks per issue poll and wait for disk before cloning (#1805)
deploy / plan (push) Successful in 1m6s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 11s
2026-11-08 17:26:00 +11:00
sam 3cf025fb4a fix(worktree): mirror fetch follows moved tags and rewritten branches
Quality / check (push) Successful in 6m46s
deploy / gate (push) Successful in 4m35s
deploy / archied-image (push) Successful in 2m55s
deploy / agent-image (push) Successful in 12s
deploy / dist-zip (push) Skipped
2026-11-03 10:00:04 +11:00
sam 6cd9c4a7d8 feat(daemon): built-in maintenance jobs and idle mirror pruning
Cycle's maintenance passes become a BuiltinJobs list for the scheduler to
seed as locked schedules. Mirrors use a file lock shared by every Manager
and held across refresh and clone, so pruning cannot race a clone.
2026-10-26 00:37:25 +11:00
sam 19570ad4bb fix(logging): route ui, messaging and playbook logs through the service log 2026-10-26 00:18:39 +11:00
sam 656feab2a4 refactor(logging): log with the caller's context so records carry trace ids 2026-10-25 23:30:01 +11:00
sam 74e34fb07a perf(worktree): clone tasks from a shared per-repository mirror 2026-10-25 21:55:20 +11:00
sam 3b7193c207 refactor!: remove the diff-size cap and its gate.diff-size step 2026-10-24 22:19:23 +11:00
sam 05987f04e2 feat(daemon): execute and verify organisation repository connections 2026-10-17 09:32:39 +11:00
sam 948a8d34fd test(worktree): give each transport its own branch
The four subtests share one bare repo but pushed the same feat/1-test
branch. Their commits have the same tree, message, author and parent, so
two commits in the same second hash identically and the second push is a
no-op -- passing by luck -- while a second of clock drift makes it a
non-fast-forward failure. One issue per subtest gives each its own branch.
2026-10-10 22:05:22 +11:00
sam a4e7ea8cc3 fix(kit): migrate runtime to sandbox kit m8 2026-10-09 18:31:56 +11:00
sam 3360cddb5a refactor(staterpc,releaseupdate,agentexec,storecontract,worktree): cut comments down to what the code does 2026-10-03 22:00:43 +10:00
sam 030b4ed176 refactor: strip doc and issue narration from code comments
Remove PRD/doc paths, bead IDs, phase notes and deleted-test references
from comments; drop test-only hooks left by the test deletion. Includes
in-progress archied bootstrap, gateway and query changes.
2026-10-03 21:47:46 +10:00
sam 780bc44d82 refactor: testing from the beginning. a journey in 150k lines of tests to none 2026-10-03 21:16:25 +10:00
sam aacec67c24 docs: delete the superseded adversarial review document family
The adversarial self-review system was removed in 625ead95, but four pages
describing it survived: the architecture page, its design-decision PRD, and the
two superseded calibration/operator PRDs. The architecture page carried a
hand-written "removed, not shipped" banner and was kept only because live PRDs
linked to it, so every reader paid for a system the tree no longer has.

Delete all four and repoint the live referrers at the authority that replaced
them (docs/prds/pr-review-agent.md): inline-review.md's Builds-on line,
pr-review-remediation.md's isolation-contract citation, pr-review-agent.md's
supersede clause, CLAUDE.md's contributor rule, and three Go comments that cited
the deleted paths. Regenerate docs/data/generated/dev-docs.json.

History stays in git; the tree stops describing a system it does not have.
2026-10-03 00:01:42 +10:00
sam 4e5b91d791 fix(daemon): resume a retry whose worktree is gone
prepareWorkspace chose between Manager.Prepare (refresh onto base) and a
separate Manager.Resume, and Manager.Resume only opened an
already-prepared clone. A remediation whose local worktree the terminal
cleanup removed, an expired volume dropped, or a different host never had
could therefore never be resumed, and the retry path had no way to select
the mode that continues pushed work.

Unify the two matched methods into Prepare(..., Target): Fresh resets onto
origin/<base>, a non-empty Target resets onto origin/<that branch>, and
either target clones a missing worktree. The daemon's retry path selects
the target from the task row and passes the persisted branch, so a resume
lands on the branch the open PR lives on and fails closed when it is not
on the remote.

Delete the container-mode no-op resume (hybridTrees.Resume and the
resumableTrees capability) now that the daemon owns it. The remediate
workflow no longer stages a resume, and the retired remediate.resume step
word stays resolvable as an inert stage: a stored definition is validated
as a whole collection, so a removed word would fail every workflow to
decode, not just its own.
2026-10-02 10:24:52 +10:00
sam d320a1a01a feat(eda): workflow inputs, optional repository and agent profiles
Workflow definitions declare inputs, repository (none, optional or
required; default required) and profile. A binding assigns each input
from a mapped parameter or a constant and may take its repository from a
parameter, which must name a configured repo; both are checked when the
binding is saved and again at dispatch. Inputs travel as structured task
data (tasks.inputs, the task brief, and a JSON block in the agent's
mission), never as body text.

A task with no repository runs in a per-task scratch workspace with no
clone and no publication grant. The agent.run step runs one mission
without a repository and finishes the task in the new completed status.

Agent profiles live under [containers.profiles.<name>]: an image and an
allowlist over the tools archie adds (MCP, scripts, plugins).
[containers].image is the default profile; an unconfigured profile parks
the task. The workflow is now pinned before the container starts so the
profile can choose its image.

Also stop two archied tests writing embedded NATS state into the package
directory, refuse an empty state_dir for embedded NATS, and drop the NATS
store files an earlier lane commit tracked.
2026-09-24 20:29:33 +10:00
sam e1c4914873 fix(workflow): make gate.diff-rules fail closed on a change it never read
The step's contract said it diffs "the worktree". It does not: Trees.Diff
reports the merge base against HEAD, so only committed work is visible.
A stored definition that placed gate.diff-rules before the step that
commits therefore ran every rule against an empty diff, found nothing and
returned nil, letting the run proceed -- the "load and check nothing"
failure the same file's settings validation exists to prevent, and
indistinguishable in the run's events from a change that passed.

The rules now read the committed change, and a run that read no committed
change while the worktree still holds uncommitted work fails on the spot,
naming the step it must follow. The count of added lines read is logged on
every run, so "checked nothing" is visible rather than silent.

Telling those two apart needs a fact Trees does not carry, so it arrives as
the same shape of optional capability changeStatsReader is: an unexported
interface in the domain, implemented where git is actually read
(worktree.Manager.HasUncommittedChanges, which excludes ignored files the
way CommitAll's own status check does) and forwarded by hybridTrees, the
Trees every production run uses. A Trees implementation that cannot answer
is refused rather than assumed clean: for a gate, silence about the change
is a failure, not a pass.

The four remaining review findings are recorded, not fixed, in
archie-core-ze7y (the escalated .archie/stages/*.go decision, P1, which now
blocks archie-core-8szi), archie-core-4kbg (discoverability),
archie-core-s1jz (hunk-header and threshold hardening) and archie-core-vof9
(retry keeps the pinned definition, so a rule cannot be unblocked by
editing it).
2026-09-21 20:43:48 +10:00
sam 2c09f42ff4 feat(tasks): attribute events, changes and config to the attempt that produced them
The events table had no attempt column, so two attempts of the same task were
indistinguishable: a retried task's stage events interleaved into one timeline and
nothing could say which run produced a given result.

- events gains an `attempt` column through the existing presence-gated
  migrateTasks loop rather than a version bump, so user_version stays 3 and an
  existing archie.db is migrated in place. A legacy-database test builds the
  pre-change schema and proves both that existing rows survive unattributed
  (attempt = 0) and that a new value round-trips.
- Event.attempt = 11 and ReadTaskLogRequest.stage = 9 are field additions to
  existing messages: no new RPC, no new table, and no change to any canonical error
  message that crosses the state-store wire.
- Every task event the workflow engine emits now carries the attempt. Producers
  that have no attempt yet (task_queued, binding_dispatch_failure) stay
  unattributed rather than guessing one.
- Changed files are captured as a durable changes_captured event at commit and push
  time, reusing the existing three-dot diff primitive: paths from FilePatches(),
  counts from Stats(), base_sha recorded as the merge base actually diffed rather
  than the base tip, a 200-file cap with totals kept complete. Consumption goes
  through an unexported optional interface so workflow.Trees -- the yaegi capability
  surface for interpreted stage plugins -- is not widened. A capture is also taken
  once the pull request exists, so the capture can link it.
- The per-attempt configuration is captured as a durable config_captured event
  carrying the non-secret config.TaskConfig, instead of a new table plus two new
  state-store RPCs: events are already this system's per-attempt provenance stream,
  so a table would have given one feature two provenance mechanisms. Redaction is
  proven against canary secrets. Measured payload: 539 bytes typical, 2333 bytes at
  20 models.
- Captures carry a schema marker and are refused unless their key set matches the
  declared payload shape, so drift surfaces as "recorded but could not be read"
  rather than as a capture of zeroes.
- Three read endpoints serve the attempt rail, the changed-file captures and a raw
  debug view, mapping to UI-owned response types rather than dumping store types.
- The task-log read gains a stage filter, bound to the stage logger for that
  stage's own lines; agent and tool output records no stage.

A task-scoped grant may already insert events on its own task, so this provenance
is exactly as trustworthy as the rest of that task's event stream. That limit is
documented rather than papered over.
2026-09-18 18:32:59 +10:00
sam fe3d508b6c fix(worktree): recover retries from path-type conflicts and stop masking the cause
A retry after any attempt that did not commit failed with

  worktree prepare failed: checkout branch <branch>:
  a branch named "refs/heads/<branch>" already exists

on a branch that was never the problem. refresh inferred "the branch does
not exist yet" from a failed checkout and reported whatever the Create
fallback then returned, so the real failure was replaced by a false one --
and the operator had no way to tell that the park reason was fiction.

The real failure, reproduced: a stage running in the container can leave a
path whose TYPE contradicts the tree refresh resets onto -- a directory
where the base tree has a file, or a file where the base tree has a
directory. go-git's hard reset cannot write over that contradiction and
fails with `openat <path>: is a directory` / `not a directory`, which is
exactly the failure the Create fallback then relabelled. Retry could not
recover from it, and a second path of the same class (a branch removed
while HEAD still pointed at it) failed with "reference not found".

refresh now clears the worktree against the tree it is resetting ONTO
before it checks anything out, which removes exactly those conflicts -- an
on-disk directory the tree declares as a file is untracked, and so is a
file the tree declares as a directory -- and resolves the branch's
existence from the reference store instead of inferring it. Resume gets the
same treatment, so the remediate path cannot fail the same way.

This is the third fix to this function (Force in 05944b6f was the second),
so the checkout/reset/clean sequence is rewritten rather than patched again.
2026-09-18 01:49:28 +10:00
sam 83177089cb feat(worktree): Resume re-syncs a worktree onto its branch tip
Add Manager.Resume, the complement of refresh: refresh resets to origin/<base>
for a fresh run; Resume fetches and hard-resets to origin/<branch> so the
already-pushed PR work survives. This is the worktree primitive the remediate
workflow (archie-core-8li9 step 3) needs to continue work on an existing PR
branch without discarding its commits.

Tests pin the discriminating property: Resume lands on the branch tip (the
committed work), not base, and cleans abandoned untracked files.
2026-09-11 19:44:48 +10:00
sam 7d38c1d1d9 fix(archied): share one PR reviewer across channels; harden forge and worktree
Addresses PR #783 review findings:

- Memoize the operator-triggered PR reviewer on boot so the Web UI and
  Telegram share one in-flight set; a concurrent review of the same PR from
  two channels now deduplicates instead of running twice.
- Guard Gitea GetPullRequest against a nil head/base (deleted branch returns
  null from Gitea), returning an error instead of panicking.
- Create the worktree root in CheckoutPR before MkdirTemp so a first review on
  a fresh work_dir does not fail with os.ErrNotExist.
2026-09-10 01:09:31 +10:00
sam ad1e6ea0d3 feat(gateway): operator-triggered PR review with selectable reviewer model
Add a channel-neutral review_pr command that runs the adversarial reviewer
against an existing pull request and returns structured findings. The Web UI
chat and Telegram invoke the same command; the reviewer model is models.reviewer
(falling back to models.builder), configurable independently of planner/builder.

- forge: PullRequest + PullRequestReader.GetPullRequest (github, gitea)
- worktree: Manager.CheckoutPR materialises a PR head for Diff/Snapshot
- agentworker: NewOperatorReviewer + ReviewerModel (single model-resolution rule)
- gateway: review_pr tool, ChatPRReviewer, wired into TurnRunner for every channel
- archied: prReviewer adapter with identity-scoped repo allow-list and
  per-PR single-flight, so duplicate/concurrent reviews are deterministic

Closes archie-core-h019.8.
2026-09-10 01:09:31 +10:00
samcharles93 83dc672074 fix: baseline gate repair (go test ./... -count=1) 2026-09-02 03:53:40 +00:00
sam c3e9e4c43e feat(workflow): adversarial self-review stage before PR open
Implements archie-core-h019.3 (reviewer isolation) and h019.4 (wiring),
per docs/prds/adversarial-self-review.md.

- internal/domain/workflow: new Reviewer interface and StageReview,
  inserted between StageDiffCap and StageOpenPR in the implement
  workflow. Fail-closed: a review that didn't run, or a confirmed
  error-level finding, parks the task (store.StatusParked) with
  findings in Detail; warn/plausible findings never block. Inert
  unless Repo.ReviewEnabled.
- internal/worktree: Manager.Snapshot exports HEAD's tracked files into
  a fresh directory with no .git, for the reviewer's isolated
  workspace. Trees interface gains Snapshot; hybridTrees delegates to
  it.
- internal/app/agentworker: subagentReviewer implements Reviewer using
  ai-sdk's agent.Subagent (nested, in-process, non-streaming
  generation) -- conversation isolation is structural (Subagent.Run
  never carries message history), workspace isolation is the snapshot
  above. The reviewer's toolset is read-only (read/grep/find) rooted
  at the snapshot, never the worker's own toolset, so it cannot reach
  the worktreerpc publication grant. Findings are captured via a typed
  record_finding tool appending to a slice the stage owns, read even
  when Subagent.Run errors (a truncated run's captured findings
  survive).
- internal/config: Repo.ReviewEnabled (default false) and
  Models["reviewer"] (falls back to Models["builder"], no schema
  change).

Judgment calls: Reviewer.Review never returns a Go error -- every
failure folds into ReviewReport per the PRD's fail-closed contract,
which the stage can act on uniformly. A Subagent.Run error with zero
captured findings resolves to ReviewStatusNotRun (park); a
Subagent.Run error with >=1 captured findings resolves to
ReviewStatusCompleted with those findings, since the PRD's own example
("three defects survive a step-limit truncation") requires them to
still be evaluated for blocking rather than discarded.
2026-08-31 21:51:33 +10:00
sam 32c722fe4a refactor: go modernisation fixes 2026-08-29 00:20:05 +10:00
sam 001664ff20 refactor(worktree): go fix modernisation of parseTitlePrefix
strings.Index plus slicing becomes strings.Cut. Semantics are unchanged:
Cut splits on the first separator, so before/after equal the previous
title[:idx] and title[idx+1:], and ok mirrors idx != -1.
2026-08-24 18:07:27 +10:00
sam 1c8eb1b43b fix(worktree): remove dead body parameter and wire branchPrefix to archieBranch 2026-08-24 18:01:09 +10:00
sam 7d5a48529c fix(worktree): handle post-push metadata resilience, cancellation, and branch naming
Fix three distinct bugs in worktree operations:
- Push post-publication metadata failure no longer reports a push error after successful ref publication; errors recording upstream tracking are logged as warnings via Manager.Log/slog.Default().
- CommitAll honours context cancellation and deadline expiration before and between go-git staging and committing phases, preventing unintended index or HEAD mutations.
- Align branch naming precedence by deriving conventional commit prefixes from issue titles first before falling back to labels and defaulting to feat; remove dead parameters and TrimSuffix no-op; align branchSlug documentation and boundary limit to 60 characters.
2026-08-24 17:56:18 +10:00
sam 799116c32e fix(worktree): clean untracked files when .git is a gitdir file
cleanUntracked returned filepath.SkipDir for the ".git" entry
unconditionally. On a non-directory, SkipDir skips the remaining
entries of the *parent* directory -- at the worktree root that is the
rest of the walk. A repository whose .git is a gitdir pointer file
(a linked worktree, or a clone adopted by migrateLegacy) therefore had
cleaning silently no-op, and CommitAll staged and published the
previous attempt's abandoned untracked files onto the task branch.

Suppress descent only for the directory shape; the pointer file is
skipped as an ordinary tracked-path miss would be, and left intact.

Refs archie-core-1ysw.3
2026-08-24 13:11:40 +10:00
sam d998c33b0d refactor: remove dead BasePlatformAdapter code 2026-08-22 23:23:51 +10:00
sam 625d95f4ee fix(worktree): reject diffs without merge base 2026-08-22 22:06:54 +10:00
sam 196dd02a6d fix(worktree): reset retries to pristine base
Retry used to retain ignored and untracked output from an interrupted attempt, which CommitAll could publish later. Refresh now derives the tracked HEAD shape, removes every other worktree entry outside .git, and fails closed when the configured base cannot resolve.
2026-08-22 22:06:54 +10:00
sam dbb6550ab3 fix(worktree): bind publication to dispatch grants
Worktree RPC used to accept repository coordinates from the sandbox. It now accepts only an opaque per-dispatch grant, and the daemon derives the repository path and branch from grant-owned state.

Repository worktree paths also move from an ambiguous flattened key to encoded owner/repo components. Origin-matched legacy clones migrate safely; mismatched legacy paths are preserved.
2026-08-22 22:06:54 +10:00
sam 05944b6fd3 fix(worktree): force checkout so retry recovers from a dirty worktree
refresh checked out the task branch without Force before hard-resetting
to base. A prior attempt's leftover uncommitted changes -- a killed
container, or a stage that edits files before ever reaching a commit --
made go-git's default MergeReset checkout refuse to reconcile them, even
with HEAD already on the correct branch and the target commit unmoved.
The fallback then made it worse: any checkout failure was assumed to
mean the branch didn't exist yet, so it retried with Create: true, which
failed with a much more confusing error since the branch did exist --
"a branch named ... already exists" -- masking the real cause and
parking the retry with the same unhelpful message every time.

Reproduced directly against a live deployment's actual broken worktree
(modified tracked file, untracked file, branch already checked out) and
confirmed retry then succeeds and correctly restores to base.

Force is safe unconditionally here: refresh hard-resets to base a few
lines later regardless of what checkout leaves behind.

Closes #523
2026-08-15 11:22:22 +10:00
sam 61b4b7b0cf refactor(store): replace legacy persistence with SQLite
Task and event persistence now uses a dedicated SQLite sidecar derived from the configured state prefix, matching the independently persisted conversation store. The configured path now means a state-path prefix rather than a database file so fresh SQLite state never attempts to interpret the previous storage format.

Remove the retired implementation and dependency completely, strengthen SQLite migrations and concurrency behavior, restore backend-neutral coverage, and align configuration, operational guidance, UI labels, and deployment documentation with the new storage and host-daemon topology.
2026-08-09 22:27:25 +10:00
sam efdc652488 fix(worktree): name the missing forge credential when push fails
Push previously handed an empty token straight to go-git and let the
push fail with a bare transport/auth error. When a repo is configured
while the forge is disabled (missing credential), that failure surfaced
late -- at push time -- with a message that didn't explain the cause.

Push now checks whether the worktree's origin remote is HTTP(S) (the
only transport that needs a token) before attempting the push, and
fails immediately with a message naming the missing forge.token
configuration. Local/file transports (used by the test double) are
unaffected -- they never needed a token.

Refs archie-core-3fb
2026-08-05 11:55:39 +10:00
sam 4c0a06df6d fix(container): write the task boot brief under .git
WriteTaskJSON wrote task.json to the worktree root -- the same worktree
the agent commits from. CommitAll stages with go-git's All option, and
go-git's Add does not honour .gitignore or .git/info/exclude, so the
brief was swept into the agent's commit and pushed onto every task
branch. That is how a task.json for issue #57 ended up committed in
the repo root.

This is the identical failure the prepared sentinel hit; worktree.go
already documents the fix. Nothing under .git can ever be tracked, so
put the brief there rather than papering over it with an exclude.
2026-07-31 01:13:08 +10:00
sam f800e1de36 refactor(worktree): replace git shell-out with go-git v6
internal/worktree no longer executes the git binary. Clone, fetch,
checkout, commit, push and diff all run in-process through go-git v6,
which also removes the package's 9 noctx findings since the Context
variants are first-class.

Security: the forge token no longer leaves the process. The old
implementation wrote a GIT_ASKPASS shell script to disk and exported the
token into the environment of every git child process. Authentication is
now an in-process credential passed via client.WithHTTPAuth. cloneURL
also stops embedding the bot user in the GitHub URL.

Dropped the per-repo object cache (PreparePersistent, prepareCache,
CleanupExpiredCaches). go-git can clone with shared alternates but has no
equivalent of --dissociate, so a cached bare repo would remain a live
dependency of every worktree built from it, and expiring one would
corrupt running tasks rather than fail cleanly. Every task now gets an
independent full clone. repo.PersistentStorage still governs the
container volume; only the git object cache is gone.

Two real defects surfaced while porting, both caught by the new tests:

  - go-git honours the host's global git config and cannot sign commits
    (no gpg fallback, only an ObjectSigner plugin). On any machine with
    commit.gpgSign=true set globally, every bot commit would have failed
    with "cannot auto-sign commit". setIdentity now pins gpgsign=false in
    the clone's own config so daemon behaviour does not depend on the
    ambient config of whatever host it runs on.
  - go-git's Add(All) does NOT honour .git/info/exclude, which is how the
    .archie-prepared sentinel was kept untracked. It was being committed
    and would have been pushed onto every task branch. The sentinel now
    lives at .git/archie-prepared, where nothing can ever track it, and a
    regression test asserts it never appears in a commit.

Diff is now merge-base relative via Commit.MergeBase, matching the three
dot semantics of `git diff origin/base...HEAD`; diffing against the remote
tip would attribute commits landed on base since the branch started to
this task and could trip the diff-size cap. Base resolution tries the
remote-tracking ref first and falls back to the short "origin/<base>"
revision, keeping git's more permissive lookup.

The test suite was rebuilt on go-git fixtures and no longer needs a git
binary installed to run.
2026-07-28 01:56:59 +10:00