8000 A project stop survives a fresh clone: the stop is a mission ledger row (M10.4) by adeelahmad · Pull Request #116 · adeelahmad/aloop · GitHub
[go: up one dir, main page]

Skip to content

A project stop survives a fresh clone: the stop is a mission ledger row (M10.4) - #116

Merged
adeelahmad merged 1 commit into
masterfrom
claude/project-thread-qerfr9
Oct 20, 2026
Merged

adeelahmad merged 1 commit into
masterfrom
claude/project-thread-qerfr9

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Before: aloop stop set a flag in .aladdin/state/STOP, which is git-ignored run data. A fresh clone, such as another machine or a scheduled mission run, did not see it and ran as if nothing had been stopped.

After: in a project with a mission ledger, the stop and its clear are also hash-chained ledger rows (run.stopped, run.resumed). A clone is refused by the hooks on every host and gets STOPPED from mission tick until the human runs aloop stop --clear in their own terminal there. That clear is a ledger row as well. This closes the last open item for M10.4 ("recorded as a ledger row like the budget stop").

How:

  • _stop.read falls back to ledger_stop, which reads the ledger's newest stop or resume row. It counts only intact rows, and it parses the ledger only when the file contains "run.stopped", because this check runs on every tool call.
  • run.stopped and run.resumed are added to LEDGER_EVENTS.
  • stop writes the row through _mission.record, which also emits the event, so each stop still produces exactly one event.
  • When the ledger is broken, --clear refuses to run and says to restore the ledger. The local flag still stops the project.
  • Docs updated: README, ROADMAP M10, and the mission README facts table.

Evidence:

  • scripts/test/project-stop.test.py check 8 fails on master (no ledger row) and passes now.
  • Check 8 covers: stop, commit, clone, the clone reports stopped, the hooks deny, tick returns STOPPED, --clear is refused in an agent shell, the human's clear works, and the original checkout keeps its own stop until it is cleared there.
  • make ci: 82/82 checks pass.

Generated by Claude Code

…ssion ledger rows (M10.4)

With a mission ledger, `aloop stop` and `aloop stop --clear` also append
hash-chained ledger rows, and the stop flag reader falls back to the
ledger's newest stop row, so a clone (another machine, a scheduled run)
is refused by the hooks and answered STOPPED by mission tick until the
human clears it there. project-stop.test.py check 8 (red on master).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QxyVf3NgwsgRyYpBgDDTC
@adeelahmad
adeelahmad marked this pull request as ready for review October 20, 2026 18:09
@adeelahmad
adeelahmad merged commit e8350ef into master Oct 20, 2026
5 checks passed
adeelahmad pushed a commit that referenced this pull request Oct 20, 2026
…sh-clone stop) into the M9.31 branch

ROADMAP: the M9 row keeps this branch's done/open lists and adds M9.42
(done in #114) and M9.48 (open); the M10 row takes master's fresh-clone
stop and says the OpenCode plugin exports ALOOP_AGENT_SHELL since M9.31.
aloop.js: the SubagentStart comment names both the core principles and
the artifact gate's per-task start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012rsDo9GYzNx8tXucywZHnA
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.

2 participants

0