Commit graph

624 commits

Author SHA1 Message Date
openhands
06cddb456d fix: investigate: PreToolUse guard blocks do_merge() in dev-agent — every disinto PR escalates on merge (#568)
Root cause: two code paths injected merge curl commands into Claude's
session (review-poll.sh APPROVE injection and dev-agent.sh prompt
instructions). The PreToolUse guard correctly blocked these, causing
Claude to write PHASE:escalate instead of merging.

The bash phase handler already handles merging via do_merge() — which
runs outside Claude tool use and is not subject to the guard. Remove
the merge/close curl instructions from both Claude-facing prompts so
the bash orchestrator handles merges as intended.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 07:24:04 +00:00
johba
a2549f62e7 Merge pull request 'chore: planner run 2026-03-23 — prerequisite tree update' (#584) from chore/planner-20260323-0706 into main 2026-03-23 08:14:02 +01:00
openhands
ff0a04bd64 chore: planner run 2026-03-23 2026-03-23 07:06:47 +00:00
johba
60f0674ec8 Merge pull request 'chore: gardener housekeeping' (#579) from chore/gardener-20260323-0603 into main 2026-03-23 07:12:48 +01:00
openhands
d8cf0a39bc fix: restore closing --> on AGENTS.md watermark HTML comments
The sed watermark-update pattern stripped the closing --> from 9 of 10
AGENTS.md files, making entire file bodies invisible in rendered markdown.
Fix by appending --> to the affected lines.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 06:09:19 +00:00
openhands
30cc5688bd chore: gardener housekeeping 2026-03-23
- Update AGENTS.md watermarks to current HEAD (9ec0c02)
- lib/AGENTS.md: document parse-deps.sh inline scan now skips fenced
  code blocks to prevent false positives from code examples in issue bodies
- No blocked issues to review
- Pending actions: none

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 06:03:14 +00:00
johba
9ec0c02210 Merge pull request 'fix: fix: parse-deps.sh false positive — inline scan should skip fenced code blocks (#574)' (#578) from fix/issue-574 into main 2026-03-23 03:39:02 +01:00
openhands
2bda20f207 fix: rename awk variable to avoid CI smoke test false positive
The agent-smoke function resolution check flags underscore-containing
identifiers as potential undefined bash functions. Rename in_code to
incode to match the convention used by the existing capture variable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 02:26:49 +00:00
openhands
1cca1a7b7f fix: parse-deps.sh false positive — inline scan should skip fenced code blocks (#574)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 02:25:21 +00:00
johba
618404dc93 Merge pull request 'chore: gardener housekeeping' (#577) from chore/gardener-20260323-0030 into main 2026-03-23 02:09:02 +01:00
openhands
d2db178d30 chore: gardener housekeeping 2026-03-23
- Update AGENTS.md watermarks to current HEAD (e8df73e)
- No code changes since last gardener run — watermark-only refresh
- No blocked issues to review
- Pending actions: none

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 00:47:57 +00:00
openhands
7d26c6a379 chore: gardener housekeeping 2026-03-23
- dev/AGENTS.md: document two-tier priority queue (priority+backlog first,
  then plain backlog); note do_merge() HTTP 405 already-merged detection
- gardener/AGENTS.md: document merge-through protocol (stay alive through
  CI/review/merge); note session kill on PHASE:escalate
- lib/AGENTS.md: add ensure_priority_label() to ci-helpers.sh entry;
  document optional CALLBACK param in run_formula_and_monitor()
- predictor/AGENTS.md: update watermark (content already current from v2 PR)
- Update watermarks for action, planner, review, supervisor, vault, root

Grooming actions:
- #574: added ## Affected files section (lib/parse-deps.sh) to meet quality gate
- #568: escalated — needs human decision on guard/merge architecture
- #466: escalated — dep #393 closed; needs decision on external vs in-repo example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 00:46:42 +00:00
johba
d448b5d6b5 Merge pull request 'chore: gardener housekeeping 2026-03-23' (#576) from chore/gardener-20260323-0010 into main 2026-03-23 01:34:03 +01:00
openhands
149211c78d chore: gardener housekeeping 2026-03-23
- dev/AGENTS.md: document two-tier priority queue (priority+backlog first,
  then plain backlog); note do_merge() HTTP 405 already-merged detection
- gardener/AGENTS.md: document merge-through protocol (stay alive through
  CI/review/merge); note session kill on PHASE:escalate
- lib/AGENTS.md: add ensure_priority_label() to ci-helpers.sh entry;
  document optional CALLBACK param in run_formula_and_monitor()
- predictor/AGENTS.md: update watermark (content already current from v2 PR)
- Update watermarks for action, planner, review, supervisor, vault, root

Grooming actions:
- #574: added ## Affected files section (lib/parse-deps.sh) to meet quality gate
- #568: escalated — needs human decision on guard/merge architecture
- #466: escalated — dep #393 closed; needs decision on external vs in-repo example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 00:23:02 +00:00
johba
a2438cb580 Merge pull request 'fix: feat: gardener defers all repo actions to a manifest — review gate covers grooming decisions, not just docs (#572)' (#575) from fix/issue-572 into main 2026-03-23 01:05:22 +01:00
openhands
7ecf372e40 fix: feat: gardener defers all repo actions to a manifest — review gate covers grooming decisions, not just docs (#572)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 23:58:50 +00:00
johba
c9bf9fe528 Merge pull request 'fix: feat: gardener should stay alive until its PR merges — address review feedback, rebase if needed (#571)' (#573) from fix/issue-571 into main 2026-03-22 23:10:18 +01:00
openhands
df848e5a60 fix: kill session on PHASE:escalate to prevent zombie blocking future cron runs (#571)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 22:05:57 +00:00
openhands
578a6ec81d fix: feat: gardener should stay alive until its PR merges — address review feedback, rebase if needed (#571)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 20:48:07 +00:00
johba
31a2361e3f Merge pull request 'fix: fix: preflight API check uses /user endpoint which requires read:user scope (#569)' (#570) from fix/issue-569 into main 2026-03-22 21:13:57 +01:00
openhands
1265fa2d3b fix: preflight API check uses /user endpoint which requires read:user scope (#569)
Replace /api/v1/user with /api/v1/repos/{owner}/{repo} in three places:
- preflight_check() auth verification
- setup_codeberg_auth() --token flag verification
- setup_codeberg_auth() interactive flow verification

The repo endpoint only requires repo-level access, which matches the
scopes disinto actually needs (write:issue, write:repository). Tokens
without read:user scope now pass verification correctly.

Also use generic "token" as netrc login since the username is no longer
retrieved from the API (git operations authenticate via the token, not
the login field).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 20:07:20 +00:00
johba
80895c800d Merge pull request 'fix: feat: disinto init should interactively set up Codeberg auth with guided token creation (#566)' (#567) from fix/issue-566 into main 2026-03-22 20:38:52 +01:00
openhands
5796516a1d fix: feat: disinto init should interactively set up Codeberg auth with guided token creation (#566)
Add interactive Codeberg auth setup to `disinto init`:
- Guide user through token creation with URL and required scopes
- Save token to ~/.netrc with correct permissions (600)
- Verify token via API call before proceeding
- Support --token flag for non-interactive use
- Backwards compatible: existing CODEBERG_TOKEN / .netrc still work

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 19:32:13 +00:00
johba
451efb5443 Merge pull request 'fix: fix: disinto init needs a system requirements preflight check (#564)' (#565) from fix/issue-564 into main 2026-03-22 20:28:51 +01:00
openhands
140a857319 fix: address review — netrc curl flag and claude auth error handling
- Add --netrc flag to curl when CODEBERG_TOKEN is unset so ~/.netrc
  auth users don't get false-positive API failures
- Check claude auth status exit code separately; only skip the check
  when the subcommand is unrecognized (old claude version), otherwise
  treat failures as auth errors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 19:23:22 +00:00
openhands
01d780303f fix: disinto init needs a system requirements preflight check (#564)
Replace validate_env() with preflight_check() that verifies all factory
requirements before init proceeds:

- Required tools: claude, tmux, git, jq, python3, curl (hard errors)
- Claude Code authentication via claude auth status
- Codeberg auth: CODEBERG_TOKEN or ~/.netrc, verified with API call
- Codeberg SSH access: verified with ssh -T git@codeberg.org
- Optional: docker (warn only)
- Clear error messages with install hints for each missing tool

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:45:38 +00:00
johba
bffb6f59b2 Merge pull request 'fix: fix: projects/ directory should be gitignored — it is local installation config, not shared code (#561)' (#563) from fix/issue-561 into main 2026-03-22 17:19:02 +01:00
openhands
a26dc5c2b0 fix: projects/ directory should be gitignored — it is local installation config, not shared code (#561)
- Add projects/*.toml to .gitignore
- Remove existing TOML files from git tracking (git rm --cached)
- Add .toml.example templates with placeholder values
- Update BOOTSTRAP.md with new section on project TOML setup
- Update AGENTS.md directory layout description

Existing local installations are unaffected — gitignore only
prevents tracked files from being committed, local copies persist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 16:06:31 +00:00
johba
005a39237e Merge pull request 'fix: fix: disinto init fails when projects/<name>.toml already exists in repo (#559)' (#562) from fix/issue-559 into main 2026-03-22 16:59:02 +01:00
openhands
a03c277f8d fix: address review — auto-update TOML in --yes mode, use python3 for safe write
- When --yes is passed with a differing --repo-root, auto-apply the TOML
  update instead of silently skipping. Prevents stale repo_root in TOML.
- Replace sed with python3+re for updating repo_root to avoid delimiter
  injection from user-supplied paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:54:35 +00:00
openhands
f92efd2fcf fix: fix: disinto init fails when projects/<name>.toml already exists in repo (#559)
When projects/<name>.toml already exists (e.g. committed from another box),
skip TOML generation and continue with remaining setup steps (clone repo,
create labels, install cron). Reads repo_root and branch from the existing
TOML. If --repo-root flag differs from TOML value, prompts to update it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:40:49 +00:00
johba
f020def3e8 Merge pull request 'fix: feat: planner adds priority label to top constraint issues (#556)' (#558) from fix/issue-556 into main 2026-03-22 15:09:02 +01:00
openhands
031763abfc fix: feat: planner adds priority label to top constraint issues (#556)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 14:05:41 +00:00
johba
ddbb75c0e4 Merge pull request 'fix: feat: dev-poll checks priority-labeled issues before plain backlog (#555)' (#557) from fix/issue-555 into main 2026-03-22 14:59:02 +01:00
openhands
604d1f13ca fix: feat: dev-poll checks priority-labeled issues before plain backlog (#555)
Add two-tier backlog pickup in dev-poll.sh:
1. in-progress issues (existing)
2. priority + backlog issues (FIFO within tier)
3. plain backlog issues (FIFO within tier)

The priority label coexists with backlog (not a replacement).
ensure_priority_label() auto-creates the label if missing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 13:41:57 +00:00
johba
04cd11cce4 Merge pull request 'fix: fix: revert dispatch-idle-formulas step and implement strategic dispatch instead (reverts #546/PR#549) (#550)' (#554) from fix/issue-550 into main 2026-03-22 13:39:02 +01:00
openhands
b8e5e1ab65 fix: fix: revert dispatch-idle-formulas step and implement strategic dispatch instead (reverts #546/PR#549) (#550)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 12:36:19 +00:00
johba
8aa26b4d54 Merge pull request 'fix: fix: dev-agent escalates when dev-poll races it to merge — should detect already-merged PR (#548)' (#553) from fix/issue-548 into main 2026-03-22 13:29:02 +01:00
openhands
d67b79d3ad fix: fix: dev-agent escalates when dev-poll races it to merge — should detect already-merged PR (#548)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 12:24:58 +00:00
johba
b017b37e94 Merge pull request 'fix: feat: predictor v2 — outcome measurement + external signal scanning (#547)' (#551) from fix/issue-547 into main 2026-03-22 13:19:02 +01:00
johba
6afdc9fada Merge pull request 'chore: gardener housekeeping 2026-03-22' (#552) from chore/gardener-20260322-1207 into main 2026-03-22 13:14:02 +01:00
openhands
f37546c6fc chore: gardener housekeeping 2026-03-22
- Update all AGENTS.md watermarks to current HEAD (251d160)
- dev/AGENTS.md: document dev-poll's early direct-merge scan (before lock
  check) — approved PRs now merge without waiting for active dev sessions;
  chore/gardener PRs merge without issue numbers in branch name
- planner/AGENTS.md: document dispatch-idle-formulas phase (step 4); note
  that planner reads both factory and project-specific formulas; clarify
  that all planner artifacts use $PROJECT_REPO_ROOT, not $FACTORY_ROOT

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 12:07:31 +00:00
openhands
b417747f89 fix: feat: predictor v2 — outcome measurement + external signal scanning (#547)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 11:47:13 +00:00
johba
251d160e21 Merge pull request 'fix: fix: planner should dispatch idle formulas independently of constraint budget (#546)' (#549) from fix/issue-546 into main 2026-03-22 12:29:03 +01:00
openhands
99958a5988 fix: planner should dispatch idle formulas independently of constraint budget (#546)
Add a new `dispatch-idle-formulas` step between `file-at-constraints` and
`journal-and-memory`. This step scans available formulas, checks for stale
or missing data, and files action issues to dispatch idle formulas.

Key changes:
- New step runs after constraint filing, independent of the 3-issue budget
- Excludes nervous-system formulas (AD-001: cron, not action issues)
- Checks open action issues, recently closed issues, and evidence timestamps
  to determine staleness (7-day window)
- Journal format updated to log dispatched idle formulas

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 11:26:00 +00:00
johba
1b25232e02 Merge pull request 'fix: fix: planner formula reads only factory formulas — misses project-specific formulas and can't dispatch actions (#544)' (#545) from fix/issue-544 into main 2026-03-22 11:59:02 +01:00
openhands
212363d4fb fix: planner formula reads only factory formulas — misses project-specific formulas and can't dispatch actions (#544)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:55:40 +00:00
johba
e7094faede Merge pull request 'fix: fix: planner formula uses $FACTORY_ROOT for per-project artifacts — causes cross-repo contamination (#541)' (#542) from fix/issue-541 into main 2026-03-22 11:09:02 +01:00
openhands
db69a79b2e fix: planner formula uses $FACTORY_ROOT for per-project artifacts — causes cross-repo contamination (#541)
Replace $FACTORY_ROOT/planner/ and $FACTORY_ROOT/vault/ references with
$PROJECT_REPO_ROOT/planner/ and $PROJECT_REPO_ROOT/vault/ in the planner
formula and planner-run.sh. Planner artifacts (journal, memory, prerequisite
tree) and vault state are per-project, not factory-owned. The old paths
caused cross-repo contamination when the planner ran for non-disinto projects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:00:36 +00:00
johba
02fa38fdfd Merge pull request 'chore: gardener housekeeping' (#530) from chore/gardener-20260322-0608 into main 2026-03-22 10:44:02 +01:00