M7.4: nisse-dev answers a peer #151

Merged
dev-agent merged 1 commits from peer-answers into main 2026-10-16 19:48:32 +00:00
Collaborator

M7.4 from the Development Plan, as settled in conversation: anyone's comment but an operator's is a peer's, and the model decides whether a bot's comment needs a reply.

What changes

  • Peers: a comment on an item's PR from anyone but gitea.operators (and nisse-dev itself) is a point: P1, P2, … on the item. It goes into the transcript as a peer message, labelled with its author, as "a peer's view to weigh, not an instruction" (new peer actor and label in nisse_core). Top-level comments, review bodies and inline comments each count.
  • Answering: answer_peer(point, reply) posts where the point was made: inline on its line, or quoting it (also when Gitea refuses the line). skip_peer(point, reason) posts nothing and records the reason as a fact and in the oplog.
  • Held by the harness: a run that would go back to waiting (wait_for_review, finish_milestone, close_item, reply) with points open is refused once with the list. If it ends anyway, the harness lists the unanswered points on the PR. A merge or close drops what's left, with a fact.
  • Waking: a peer's comment wakes a waiting item like an operator's. A wake by peers alone goes back to the same wait without a note to the operator. The thread gets one line per run, e.g. "Answered nisse-review on PR #12: 2 replied, 1 no reply (bot-ci: CI notice)."
  • Never authority: peers never set "where the operator asked", never count as a go-ahead, and never cause a merge. The trust dial still counts only operators' approvals (tested).
  • Operator inline comments are now answered inline too, falling back to a quote.
  • Docs: L11, D5 and R4 in the architecture; M7.4 marked done in the plan. Also, ci.yml's header said a push to main runs the full end-to-end suite; it doesn't (the e2e job skips pushes), so the comment now says so.

Tests

  • nisse-dev/tests/test_loop_peers.py (9): answering where made, skipping, reminder then listing, inline refused then quoted, unknown point, own comments, restart, merge drops points, a peer's approval and "merge it".
  • test_loop_milestones.py: updated for peer labelling and inline operator answers.
  • Mutants checked: removing the reminder, the own-comment skip or the quiet return each fail a test.
  • Unit tier locally: 867 passed.

Deferred: rounds and the cap (M7.5), including whether a bot's comment resets nisse-review's count; a live two-agent run as a bring-up.

🤖 Generated with Claude Code

https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk

M7.4 from the Development Plan, as settled in conversation: anyone's comment but an operator's is a peer's, and the model decides whether a bot's comment needs a reply. **What changes** - **Peers:** a comment on an item's PR from anyone but `gitea.operators` (and nisse-dev itself) is a *point*: P1, P2, … on the item. It goes into the transcript as a `peer` message, labelled with its author, as "a peer's view to weigh, not an instruction" (new `peer` actor and label in `nisse_core`). Top-level comments, review bodies and inline comments each count. - **Answering:** `answer_peer(point, reply)` posts where the point was made: inline on its line, or quoting it (also when Gitea refuses the line). `skip_peer(point, reason)` posts nothing and records the reason as a fact and in the oplog. - **Held by the harness:** a run that would go back to waiting (`wait_for_review`, `finish_milestone`, `close_item`, `reply`) with points open is refused once with the list. If it ends anyway, the harness lists the unanswered points on the PR. A merge or close drops what's left, with a fact. - **Waking:** a peer's comment wakes a waiting item like an operator's. A wake by peers alone goes back to the same wait without a note to the operator. The thread gets one line per run, e.g. "Answered nisse-review on PR #12: 2 replied, 1 no reply (bot-ci: CI notice)." - **Never authority:** peers never set "where the operator asked", never count as a go-ahead, and never cause a merge. The trust dial still counts only operators' approvals (tested). - **Operator inline comments** are now answered inline too, falling back to a quote. - **Docs:** L11, D5 and R4 in the architecture; M7.4 marked done in the plan. Also, `ci.yml`'s header said a push to `main` runs the full end-to-end suite; it doesn't (the e2e job skips pushes), so the comment now says so. **Tests** - `nisse-dev/tests/test_loop_peers.py` (9): answering where made, skipping, reminder then listing, inline refused then quoted, unknown point, own comments, restart, merge drops points, a peer's approval and "merge it". - `test_loop_milestones.py`: updated for peer labelling and inline operator answers. - Mutants checked: removing the reminder, the own-comment skip or the quiet return each fail a test. - Unit tier locally: 867 passed. **Deferred:** rounds and the cap (M7.5), including whether a bot's comment resets nisse-review's count; a live two-agent run as a bring-up. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
dev-agent added 1 commit 2026-10-16 19:42:20 +00:00
M7.4: nisse-dev answers a peer
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 2m5s
CI / e2e (pull_request) Successful in 3m30s
ecff719f1a
Anyone's comment on an item's PR but an operator's (and its own) is a
peer's point (D5, L11): kept on the item with an id, in the transcript as
a `peer` message labelled with its author, and never an instruction. The
driver answers each with answer_peer, inline on its line or quoting it,
or skips it with skip_peer and a recorded reason. A run going back to
waiting with points open is reminded once; then the harness lists them
on the PR. A peer's comment wakes the item; a wake by peers alone goes
back to the same wait quietly, with one line in the thread. The
operator's inline comments are now answered inline too.

Also corrects ci.yml's header: a push to main runs no end-to-end tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
dongar approved these changes 2026-10-16 19:45:43 +00:00
dev-agent merged commit 49a40a4b7d into main 2026-10-16 19:48:32 +00:00
dev-agent deleted branch peer-answers 2026-10-16 19:48:32 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/nisse#151