15 Commits
Author SHA1 Message Date
Keysat 4916dbc548 Handoff: link the tool-policy item to the two inbox items that share its gap 2026-08-21 12:36:48 -05:00
Keysat 6c67245fb5 Handoff: move the watch internals to a scoped guide, prune Current state
AGENTS.md had grown 72% in one session, most of it push-watch mechanics
that only matter when editing src/bot.py. Those move to
docs/guides/push-watch.md (paths-scoped, symlinked from .claude/rules,
matching the ten31-database and spark-control convention); AGENTS.md
keeps the operational half and a pointer.

Current state goes back to being a snapshot rather than a session log.
2026-08-21 12:35:26 -05:00
Keysat 1a39b1679c Record the push watch as live and verified end to end 2026-08-21 10:51:17 -05:00
Keysat e5a187b507 Walk the default branch first, and keep ssh noise out of the room
Rooms mapped before the push watch existed carry no default_branch, so
the "report a commit as being on master, not on some stale branch that
also contains it" ordering never applied to them. Look it up once and
keep it.

known_hosts lives in the image, so it resets on every rebuild and the
first ssh connection printed "Permanently added ... to the list of known
hosts" straight into the room, prepended to the first assessment. Set
LogLevel ERROR in the generated ssh config; real errors still come back.

Corrects two claims in Current state that the API contradicts: the repo
has had three PRs, not zero, and their review threads for #2 and #3 are
orphaned in the room right now.
2026-08-21 10:49:55 -05:00
Keysat 7ac1267dd0 Watch a repo for commits pushed by anyone but me
The bot only ever saw pull requests, so a collaborator with write access
who pushes straight to master was invisible: 18 of the last 50 commits on
ten31-brand's master arrived that way, unreviewed and unannounced.

Opt-in per repo (watch_pushes + [gitea] my_emails). Each poll cycle it
pages commits newer than a stored cursor across every branch except ones
with an open PR, keeps the commits whose git email isn't mine, posts a
notice naming author, branch, commits and files, records them, and only
then runs a claude -p assessment threaded under it. Identity comes from
the git email because these commits aren't linked to Gitea accounts.

The notice is deterministic Gitea data and the "outside the expected
area" flag is computed from globs, so the thing you actually need never
depends on a model call. Recording before the assessment is what stops a
crash in those minutes from reposting the whole notice.

Both prompts now put every attacker-authored field — titles, commit
subjects, filenames, the diff — inside a nonce-tagged fence, so a forged
terminator can't reach the instruction region.

Folds in the ROADMAP item to bound two unbounded awaits and exit if the
poll task dies, and adds the repo's first test: the watch policy against
a real-shaped Gitea fixture, with 17 mutations confirmed to fail it.
2026-08-21 10:46:03 -05:00
Keysat 6060ea57a1 Handoff: record ten31-brand onboarding, the poll-loop liveness recipe, and the branch-protection merge gotcha 2026-08-18 19:36:57 -05:00
Keysat e8144ae872 Handoff: promote the heartbeat decision and deploy-key gotcha to durable sections, prune Current state
Current state had grown into a running log of two adjudication cycles. The
2026-07-29 heartbeat drop is a decision, so it lives in Decisions with its
reopen condition; the per-repo deploy-key requirement is a durable gotcha, so it
sits with the Deploy command. What remains is present-tense status plus three
ordered next steps: the orphaned-thread prune fix, triaging this repo's 3 inbox
items, and the 2nd/3rd-repo poll-cycle check.
2026-07-29 20:12:51 -05:00
Keysat 907b83388b Adjudicate 2026-07-29: drop the wedged-loop heartbeat, add a hang-bounding fold-in
Heartbeat dropped: a Docker healthcheck badge restarts nothing under this
container's setup, spark-control's tile would need its own change to read it,
and serial per-room polling (a review may run 10 min) makes any staleness
threshold either too loose to be timely or noisy mid-review. No wedge has ever
been observed. Reopens on an observed wedge plus confirmation the tile already
renders Docker health.

Replaced by a fold-in, since the realistic failure is a hang rather than a
crash: bound the two unbounded awaits in src/bot.py and stop the process if the
poll task ever dies, letting restart: unless-stopped and the existing
spark-control tile cover it.

AGENTS.md Current state reconciled to match. Phase 3's onboard-3-repos verify
item stands (inside the 14-day skip window).
2026-07-29 20:09:42 -05:00
Keysat 23d21f306f docs: correct Spark Control tile status, record serial poll loop, refresh Current state
The Deploy section claimed a Spark Control tile was "captured in the inbox"
pending build. It isn't: spark-control has shipped this bot's tile since
v0.28.0, verified live against the running dashboard. Deploy is one click.

Record in Layout that the poll loop walks all mapped repos serially in one
async task. That's why rooms can't interleave, and why a long review
head-of-line-blocks the next room's poll at 3+ repos.

Current state: prune the finished merge-redact narrative to a line, keep
the stale-prune orphan as the concrete next step, and record the 2026-07-18
adjudication that cut ROADMAP to one phase.
2026-07-18 10:21:19 -05:00
Keysat 9adcdc8c0d Adjudicate backlog: drop finished Phase 2 and Phase 4, narrow Phase 3
Phase 2 (both lines) — done. The headless review spawns the enabled
subagents and prints each verdict under its own heading (src/bot.py),
proven end-to-end on ten31-site PR #4; the `agents +/-` handler updates
and atomically persists each room's enabled set. Finished milestone, and
the record already lives in AGENTS.md Decisions + Current state.

Phase 4 (Spark Control tile) — already built elsewhere. spark-control's
Bots tab has had a first-class gitea-review-bot entry since v0.28.0, same
code path as matrix-bridge; the running dashboard reports it live. The
work was never this repo's. Left a one-line pointer under Deferred.

Phase 3, deploy-on-a-non-static-repo — dropped. No repo needs it (only
the static ten31-site is onboarded), and it isn't doable as written: the
deploy step is hardcoded to the static-site publish script and the only
per-repo knob is on/off, not a per-repo deploy command. Exercising it
means a real deploy plus a force-merge against a live service. Revisit
when a concrete non-static repo needs it — that repo is the honest test
target, and the deploy-command field comes first.

Phase 3, three-repo onboarding — kept, annotated with its check plan and
a correction: reviews run serially, so the stated "no interleaving" exit
is trivially satisfied. What matters at 3+ repos is a long review
head-of-line-blocking the next room's poll.

New: heartbeat for wedge detection. Scoped to the gap the tile leaves —
it reads container state, so it catches a crash but not a stuck sync/poll
loop, which looks identical to healthy from outside.
2026-07-18 10:02:34 -05:00
Keysat f6f0520d21 docs: record PR #4 thread cleared + stale-prune orphan known-issue 2026-06-29 07:15:17 -05:00
Keysat 2c2fe5d0c5 docs: mark merge-redact hardening deployed; record Spark SSH alias (modelo32) 2026-06-28 21:36:52 -05:00
Keysat 063e6947f7 Redact thread on merge success even if deploy fails; add clear command
A merge whose post-merge deploy failed left the review thread orphaned (redaction was gated on deploy success). Now the thread always redacts on merge success and the deploy-failure warning is posted at top level so it survives. New clear/resolve command redacts an orphaned thread without touching the PR.
2026-06-28 21:17:36 -05:00
Keysat 16faeb06f9 docs: mark deployed; record deploy-key + subagent caveats in Current state 2026-06-28 17:16:14 -05:00
Keysat 6968e5d737 Scaffold gitea-review-bot: thin matrix-nio PR-review bot (auto-map, threaded review, subagent panel, merge/reject/deploy) 2026-06-28 15:54:44 -05:00