Skip to content

Bring the accumulated local work onto main - #191

Merged
VeryComplexAndLongName merged 5 commits into
mainfrom
fix/git-stage-gate-before-archive
Sep 3, 2026
Merged

Bring the accumulated local work onto main#191
VeryComplexAndLongName merged 5 commits into
mainfrom
fix/git-stage-gate-before-archive

Conversation

@VeryComplexAndLongName

Copy link
Copy Markdown
Owner

Everything accumulated locally, brought onto main.

The branch held three commits — two of them named "Many different changes. Sorry." and "Another changes" — and was simultaneously four commits behind origin/main. origin/main is merged in; no conflicts.

What is in it

  • Eight changes archived into openspec/changes/archive/2026-09-02-*, with their specs synced into openspec/specs/ (agentic-harness +387, execution-core +124, persistent-workbench-runs +88).
  • harness-git-stage-no-agent implemented, 18/20 — stepAgents.git no longer offers an agent for a stage that never reads one.
  • agentic-harness-documentation complete; HARNESS.md refinements and regenerated screenshots.
  • checkpoint-retention-and-lazy-load task record (see below).
  • Two changesets.

Two phantom changes removed

openspec/changes/harness-config-strictness/ and openspec/changes/agent-usage-accounting/ were left behind as empty directories when those changes were archived. Both are correctly present under archive/, but openspec list reported the husks as active changes with "No tasks".

Git does not track empty directories, so they were never going to reach main — but they were live in the local listing and the panel, which is the same "presents itself as real and is not" pattern this repository has spent the week removing. Deleted locally.

checkpoint-retention-and-lazy-load: 12/23, and the open ones are the point

Three tasks are marked open with the reason written down rather than quietly ticked:

  • 2.3 / 2.5activate() still awaits a read of every retained checkpoint. It is bounded at ten now instead of unbounded, and that is what made the window usable again. Deferral is not what fixed it, and the task should not claim otherwise.
  • 2.4details() is synchronous and answers delta, coverage and canRollback out of the checkpoint, so nothing there can be deferred without making it async and taking that through the transport protocol and both surfaces. The design that would work is recorded: persist the small parts in the reference, read the large after snapshot only on rollback. It needs a journal version bump and its own change.

Test plan

  • npm run typecheck — clean
  • npm run lint — clean
  • packages/extension 17 files / green, packages/webui 35 / 232, packages/server 3 / 61
  • packages/core — one failure, git.push.test.ts, already tracked as core-test-worker-contention and untouched here
  • npm run lint:english — passed
  • CI green

🤖 Generated with Claude Code

shouldRunGitStage reads openspec/changes/<name>/harness.json, and it ran
after the archive stage had moved that directory to
openspec/changes/archive/. The read therefore always found nothing,
always resolved to "not configured", and the git stage was always
skipped. It could never have run at the end of a real chain, under any
configuration.

The unit tests could not see it because mockArchiveSucceeds only returned
success - nothing moved, so the file was still there when the gate read
it. A mock that reports success without doing what success does certifies
the wrong thing. The mock now performs the move, and the gate is read
immediately before archive runs, which is the last moment the file
exists.

Verified by reverting the source fix and re-running: the test fails with
zero push calls and passes with the fix. Checked deliberately, because
two tests found earlier today passed no matter what the code did.

A side effect worth naming: a malformed harness.json now fails the chain
before archive rather than after, which is the better order for an
irreversible step.

This sat exactly inside the boundary drawn yesterday in task 4.4a. The
live run recorded under 4.4 verified push, pull request, checks and merge
through the real git and gh; it did not verify the chain's own wiring,
and that is where the defect was.

Also in this commit, two corrections to things I wrote.

harness-config.test.ts matched fenced JSON blocks with a bare \n. On
Windows HARNESS.md is checked out CRLF - 500 pairs, no bare LF - so the
pattern found zero blocks and the assertion failed, while CI's Linux
checkout found both and passed. Green in CI and red on the machine of
whoever edits the document is the worst of the two, and it is the third
line-ending or path-separator assumption found in tests today.

core-test-worker-contention said a single fork makes git.push.test.ts
pass. A full packages/core run with that flag still fails it at the 5000
ms default, so "parallel workers contend" is too narrow: something
accumulates over a long run regardless. The two-file experiment behind
that claim was too small to see it, and the proposal now says so - its
first task is to name the cause rather than to apply the workaround.

harness-mechanical-checks 6.6 is closed by the repository owner's own
live run, recorded in that change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…d not

Twelve of twenty-three, and the three that matter most are marked open
with the reason rather than skipped. 2.3 and 2.5: activate() still awaits
a read of every retained checkpoint, bounded now at ten rather than
unbounded, which is what made the window usable again - deferral is not
what fixed it. 2.4: details() is synchronous and answers delta, coverage
and canRollback out of the checkpoint, so nothing there can be deferred
without making it async and taking that through the transport protocol
and both surfaces. The design that would work is written down - persist
the small parts in the reference, read the large after snapshot only on
rollback - along with the fact that it needs a journal version bump and
its own change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@VeryComplexAndLongName
VeryComplexAndLongName merged commit 4e59bdf into main Sep 3, 2026
7 checks passed
@VeryComplexAndLongName
VeryComplexAndLongName deleted the fix/git-stage-gate-before-archive branch September 3, 2026 06:43
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