Commit graph

268 commits

Author SHA1 Message Date
johba
e782119a15 docs: evidence architecture — sensing, integration, deployment gates (#207)
Captures design decisions from 2026-03-18 session with Johann.

## Key decisions
- **Evidence as integration layer**: formulas adapt external platforms (Analytics, Ponder, DigitalOcean) into structured JSON in `evidence/`; planner reads evidence, not platforms
- **Process types**: sense (holdout, user-test, measure-*) vs mutation (evolution, red-team)
- **Evidence-gated deployment**: no human "ship it" — all dimensions green = deploy
- **Resource allocation**: planner reads evidence staleness + current box load, decides what to run
- **Scope**: disinto is not a general company OS — it is finetuned for money → software → customer → knowledge → market fit

## New file
- `docs/EVIDENCE-ARCHITECTURE.md`

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/207
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-19 07:55:21 +01:00
johba
e6eb9e76e0 Merge pull request 'fix: codeberg_api_all does not accept a custom token parameter (#198)' (#226) from fix/issue-198 into main 2026-03-19 02:29:14 +01:00
openhands
17907063f6 fix: codeberg_api_all does not accept a custom token parameter (#198)
Add optional second TOKEN parameter to codeberg_api_all in lib/env.sh,
defaulting to $CODEBERG_TOKEN. Pass $REVIEW_BOT_TOKEN at the dismiss
block in review-pr.sh so reviews are fetched as the review bot account.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 01:25:44 +00:00
johba
dfd4e00d34 Merge pull request 'fix: Callbacks can't see the resolved _session from monitor_phase_loop (#200)' (#225) from fix/issue-200 into main 2026-03-19 02:18:15 +01:00
openhands
e853949b47 fix: Callbacks can't see the resolved _session from monitor_phase_loop (#200)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 01:05:21 +00:00
johba
ba8bb5637e Merge pull request 'fix: dev/dev-agent.sh still passes string label name to /labels replace endpoint (#202)' (#221) from fix/issue-202 into main 2026-03-19 01:59:22 +01:00
openhands
54fa568935 fix: dev/dev-agent.sh still passes string label name to /labels replace endpoint (#202)
Look up the backlog label ID via the Gitea labels API (with fallback to
1300815) and replace '{"labels":["backlog"]}' with the integer ID form
at both call sites (cleanup() line 135 and idle_timeout handler line 713).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 00:45:57 +00:00
johba
bb6a026706 Merge pull request 'fix: fix: bundled dust cleanup — README.md (#208)' (#219) from fix/issue-208 into main 2026-03-19 01:38:51 +01:00
openhands
d24600a553 fix: fix: bundled dust cleanup — README.md (#208)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 00:35:45 +00:00
johba
eba88558f1 Merge pull request 'fix: fix: bundled dust cleanup — site (#209)' (#218) from fix/issue-209 into main 2026-03-19 01:28:11 +01:00
openhands
26ebe10ca5 fix: fix: bundled dust cleanup — site (#209)
- Add grid-template-columns: 1fr to .values grid (issue #168)
- Add site/README.md documenting og-image.jpg regeneration and
  branding update process (issues #162, #169)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 00:10:39 +00:00
johba
b18d3928f0 Merge pull request 'fix: fix: bundled dust cleanup — push3-evolution/evolve.sh (#210)' (#217) from fix/issue-210 into main 2026-03-19 01:03:53 +01:00
openhands
a0df400219 fix: fix: bundled dust cleanup — push3-evolution/evolve.sh (#210)
Implementation in johba/harb#987 (branch fix/push3-dust-cleanup):
- #716: null-fitness crash fix in generation JSONL parsing
- #944: processExecIf_fix added to ZERO_RATED_FLAGS
- #945: fitness_flags is comma-separated — update schema + effective_fitness

Note push3-evolution subsystem fitness_flags format in harb.toml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 23:50:53 +00:00
johba
9afcd15373 Merge pull request 'fix: fix: bundled dust cleanup — AGENTS.md (#211)' (#215) from fix/issue-211 into main 2026-03-18 23:37:59 +01:00
openhands
cac012219a fix: remove phase-handler.sh from agent-session.sh Sourced-by column
phase-handler.sh does not source agent-session.sh directly — dev-agent.sh
sources agent-session.sh first, then sources phase-handler.sh. Correct
the Sourced-by entry to: dev-agent.sh, gardener-agent.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:28:57 +00:00
openhands
62acdab6ea fix: fix: bundled dust cleanup — AGENTS.md (#211)
- #167: replace manually-maintained shellcheck file list with glob (git ls-files '*.sh' | xargs shellcheck)
- #188: add missing functions to lib/agent-session.sh table entry (monitor_phase_loop, create_agent_session, read_phase, inject_formula) and update Sourced-by column
- #166: agent-session.sh entry already present; Sourced-by updated to include dev-agent.sh and phase-handler.sh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:15:43 +00:00
johba
643ca7856f Merge pull request 'fix: dev/phase-handler.sh still passes string label name to /labels replace endpoint (#203)' (#212) from fix/issue-203 into main 2026-03-18 23:09:06 +01:00
openhands
08b65ddc43 fix: dev/phase-handler.sh still passes string label name to /labels replace endpoint (#203)
Look up backlog label ID via Codeberg API at the start of the PHASE:failed
branch and replace '{"labels":["backlog"]}' at lines 547 and 628 with
the numeric ID, matching the pattern already used in gardener.
2026-03-18 22:06:05 +00:00
johba
f5786de122 Merge pull request 'fix: docs: document opinionated design constraints (#30)' (#205) from fix/issue-30 into main 2026-03-18 22:37:48 +01:00
openhands
d38a797aa9 fix: correct runtime constraints — python3 is a core dependency
python3 is used directly by dev/dev-poll.sh (JSON CI-fix tracker),
lib/load-project.sh (TOML parsing via tomllib), and gardener/gardener-poll.sh
(recipe-matching engine). Add it to the dependency list and rephrase the
runtime constraint to reflect what is actually true.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 21:29:21 +00:00
openhands
7e008991a7 fix: agent-smoke.sh: use [(][)] instead of \(\) for BusyBox grep ERE compat
BusyBox grep (Alpine CI) does not treat \( as a literal paren in -E mode,
causing inject_formula to appear undefined even though it is defined in
lib/agent-session.sh. Using [(][)] is unambiguous in both GNU grep and
BusyBox grep.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 21:24:27 +00:00
openhands
a3abf9f37a fix: docs: document opinionated design constraints (#30)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 21:20:09 +00:00
johba
2d5fe2ceac Merge pull request 'fix: PRIORITY 1.5 misses REQUEST_CHANGES when CI is not yet settled (#41)' (#204) from fix/issue-41 into main 2026-03-18 22:13:01 +01:00
openhands
d1cea6c0bb fix: apply same REQUEST_CHANGES/CI-pending fix to PRIORITY 1 block 2026-03-18 21:03:53 +00:00
openhands
34ddbef3fd fix: PRIORITY 1.5 misses REQUEST_CHANGES when CI is not yet settled (#41) 2026-03-18 20:50:56 +00:00
johba
2544fc49fb Merge pull request 'fix: labels:["backlog"] passes string name to Codeberg API that expects integer IDs (#164)' (#201) from fix/issue-164 into main 2026-03-18 21:44:08 +01:00
openhands
833b07ed6e fix: labels:["backlog"] passes string name to Codeberg API that expects integer IDs (#164)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 20:36:39 +00:00
johba
cf6ecd4b3d Merge pull request 'fix: agent-session.sh: monitor_phase_loop should accept SESSION_NAME as a parameter (#187)' (#199) from fix/issue-187 into main 2026-03-18 21:29:03 +01:00
openhands
e0f37ede12 fix: agent-session.sh: monitor_phase_loop should accept SESSION_NAME as a parameter (#187)
Add optional 4th parameter to monitor_phase_loop for SESSION_NAME,
falling back to the $SESSION_NAME global for backwards-compatibility.
Document the full function signature in both the file header and inline comment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 20:15:14 +00:00
johba
76734a2f6e Merge pull request 'fix: Gitea reviews API is fetched without pagination in multiple places (#191)' (#197) from fix/issue-191 into main 2026-03-18 21:09:34 +01:00
openhands
f4cf53613c fix: Gitea reviews API is fetched without pagination in multiple places (#191) 2026-03-18 20:05:29 +00:00
johba
fe0a2f6759 Merge pull request 'fix: fix: dev-agent merge failure on "not enough approvals" should escalate immediately (#171)' (#196) from fix/issue-171 into main 2026-03-18 20:59:45 +01:00
openhands
bb2af8db10 fix: address review feedback — set -e bug, sentinel path, fragile grep, stale comment (#171)
- Fix set -e bug: use `_merge_rc=0; do_merge ... || _merge_rc=$?` so non-zero
  returns don't kill the agent before _merge_rc is captured
- Fix sentinel path: skip sentinel break for APPROVE so do_merge() always runs,
  even when review-poll.sh injected the verdict first
- Fix fragile grep: match HTTP 405 alone instead of `grep -qi "not enough"` —
  any 405 from the merge endpoint is a structural block (approvals, branch
  protection), not a transient error
- Fix stale comment/status in PHASE:done handler: "orchestrator or Claude"
  instead of "agent"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 19:53:26 +00:00
openhands
374fe2b2b4 fix: fix: dev-agent merge failure on "not enough approvals" should escalate immediately (#171)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 19:45:13 +00:00
johba
210fae9cc4 Merge pull request 'fix: fix: review-pr.sh must dismiss own prior REQUEST_CHANGES before approving (#170)' (#190) from fix/issue-170 into main 2026-03-18 20:34:12 +01:00
openhands
79851f233f fix: fix: review-pr.sh must dismiss own prior REQUEST_CHANGES before approving (#170)
Before posting an APPROVED formal review, fetch all prior reviews by
the review bot on this PR and dismiss any with state REQUEST_CHANGES.
This unblocks merges when branch protection has dismiss_stale_approvals
and the bot has prior REQUEST_CHANGES reviews from earlier rounds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 19:11:57 +00:00
johba
2f74eb3909 Merge pull request 'fix: feat: gardener formula — groom-backlog.toml with verify loop, remove timeouts (#183)' (#186) from fix/issue-183 into main 2026-03-18 19:51:09 +01:00
openhands
7456af65e9 fix: feat: gardener formula — groom-backlog.toml with verify loop, remove timeouts (#183)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 18:42:30 +00:00
johba
39cea52b0c Merge pull request 'fix: feat: dev-agent merges its own PRs via non-admin Codeberg account (#172)' (#184) from fix/issue-172 into main 2026-03-18 19:23:55 +01:00
openhands
775c290660 fix: update review-poll.sh approval injection to include merge commands
The APPROVE injection previously told the dev-agent to write PHASE:done
and let the orchestrator merge. Now the dev-agent merges directly, so the
injection includes the full merge + issue-close curl commands matching the
pattern already in the dev-agent.sh prompt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 18:10:30 +00:00
openhands
f73d5f471e fix: feat: dev-agent merges its own PRs via non-admin Codeberg account (#172)
- phase-handler.sh: remove do_merge(); on APPROVAL inject exact API
  commands for agent to merge+close directly; PHASE:done now only
  does local cleanup (tmux, worktree, labels) — merge already done
- dev-agent.sh: update PHASE_PROTOCOL_INSTRUCTIONS — Approved means
  merge via API, close issue, then write PHASE:done
- dev-poll.sh: remove try_merge_or_rebase(); for approved+CI-green
  orphaned PRs, spawn dev-agent (recovery mode) to merge instead
- .env.example: document new token roles (CODEBERG_TOKEN = bot for
  push/PR/merge; REVIEW_BOT_TOKEN = human account for approvals)
- AGENTS.md: update token descriptions to match new roles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 17:59:36 +00:00
johba
b38b2b13ae Merge pull request 'fix: fix: phase-handler.sh references LAST_PHASE_MTIME which is now internal to monitor_phase_loop (#181)' (#182) from fix/issue-181 into main 2026-03-18 18:44:02 +01:00
openhands
61c518116a fix: fix: phase-handler.sh references LAST_PHASE_MTIME which is now internal to monitor_phase_loop (#181)
Export LAST_PHASE_MTIME from monitor_phase_loop before invoking the callback
so that phase-handler.sh can compare phase file mtimes inside the awaiting_review
inner poll loop without hitting an unbound variable error under set -u.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 17:26:54 +00:00
johba
68fc89adf0 Merge pull request 'fix: feat: CI smoke test — syntax check + function resolution for all agent scripts (#177)' (#178) from fix/issue-177 into main 2026-03-18 18:19:03 +01:00
openhands
55b5628e24 feat: CI smoke test — syntax check + function resolution for all agent scripts (#177)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 17:11:02 +00:00
openhands
014965494b fix: implement monitor_phase_loop in agent-session.sh
Generic phase monitoring loop with callback for agent-specific handling.
Handles: idle timeout, session crash detection, terminal phases (done,
failed, needs_human, merged). Sets _MONITOR_LOOP_EXIT for the caller.
2026-03-18 16:40:51 +00:00
openhands
42fa8f48e0 fix: restore log, notify, notify_ctx functions to dev-agent.sh
Lost during #160 refactor. These are dev-agent specific (reference
$ISSUE, $THREAD_FILE, $LOGFILE) so they belong in the agent script,
not the shared library.
2026-03-18 16:37:55 +00:00
openhands
d83098f382 fix: pass SESSION_NAME to all agent-session.sh function calls
Library functions need explicit session name argument — they no longer
have closure over $SESSION_NAME from the parent script.

- agent_kill_session: add $SESSION_NAME to all 11 call sites
- agent_inject_into_session: add $SESSION_NAME to all call sites in
  phase-handler.sh and gardener-agent.sh
- agent_kill_session: guard against missing arg (defensive)
2026-03-18 16:24:58 +00:00
openhands
350acccd8b fix: add create_agent_session and inject_formula to agent-session.sh
Both dev-agent.sh and gardener-agent.sh call these functions but they
were never implemented during the #158 extraction. Adds:
- create_agent_session(session, workdir) — tmux + claude + wait for ready
- inject_formula(session, text) — alias for agent_inject_into_session
2026-03-18 16:21:05 +00:00
openhands
ae3e742f9f fix: rename function calls to match agent-session.sh exports (#176)
kill_tmux_session → agent_kill_session
inject_into_session → agent_inject_into_session
wait_for_claude_ready → agent_wait_for_claude_ready

Also restore status() function lost during #160 refactor.

Fixes dev-agent and gardener-agent crash on startup:
  line 149: status: command not found
  line 280: kill_tmux_session: command not found
2026-03-18 16:10:12 +00:00