Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SESSIONLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@
- Separated explicit explanation-only PR comments from change feedback so they are audited without revision bumps, `fix_needed` transitions, repair evidence, or misleading repair ledger text; repeated-pause rejection feedback now confirms the pause remains effective instead of repeating the submitted syntax.
- Corrected paused-feedback ledger wording so actionable feedback remains visibly pending without claiming repair Work was requested while pause prevents allocation.
- Changed fast command receipt reactions from `+1` to `eyes` and added an idempotent post-state-commit `+1` only for commands accepted and durably executed by serialized reconciliation.
- Made pause the primary visible status in lifecycle ledgers and the public status page while retaining the underlying activity as pending context; paused ledgers no longer suggest another pause command.
8 changes: 6 additions & 2 deletions upstreaming/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,12 @@ compiler and action updates: [`dependencies/README.md`](dependencies/README.md).
The `riseproject-dev` App appends a concise 1-2 line ledger comment after every
durable lifecycle event. Each entry shows revision, phase/activity, action,
outcome and controller workflow link, followed by a folded **Possible next
commands** section with the current revision/head prefilled. Entries are never
edited, so user commands and pipeline history remain interleaved chronologically.
commands** section with the current revision/head prefilled. A paused record is
shown primarily as `phase/paused`; its retained underlying activity is described
as pending until resume, never as current automatic activity. The public status
page likewise shows `Paused` first and includes the retained phase/activity only
as context. Entries are never edited, so user commands and pipeline history
remain interleaved chronologically.
A rejected command receives a separate App-authored reply that quotes the exact
command, pings its author, explains the rejection and shows a corrected form when
one is known. A separate controller job promptly adds an `eyes` reaction when
Expand Down
3 changes: 3 additions & 0 deletions upstreaming/generate_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def status_label(state: dict) -> str:
activity = ACTIVITY_LABELS.get(
state["activity"], state["activity"].replace("_", " ")
)
if state.get("paused"):
pending = f"; {activity} pending" if activity else ""
return f"Paused ({phase}{pending})"
return f"{phase} ({activity})" if activity else phase


Expand Down
11 changes: 9 additions & 2 deletions upstreaming/status_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ def _command_lines(record: dict) -> list[str]:
lines = []
phase = record["phase"]
if phase not in ("released", "abandoned", "superseded", "no_work", "already_released"):
lines += [f'/upstreaming pause revision={revision} reason="..."',
f'/upstreaming park revision={revision} reason="..."',
if not record.get("paused"):
lines.append(f'/upstreaming pause revision={revision} reason="..."')
lines += [f'/upstreaming park revision={revision} reason="..."',
f'/upstreaming abandon revision={revision} reason="..."']
if record.get("paused") or record.get("blocked_reason"):
lines.append(f'/upstreaming resume revision={revision} reason="..."')
Expand All @@ -59,11 +60,17 @@ def render(event: dict, record: dict, run_url: str) -> str:
revision = event.get("to", {}).get("revision", record["revision"])
phase = event.get("to", {}).get("phase", record["phase"])
activity = event.get("to", {}).get("activity", record["activity"])
underlying_activity = activity
if record.get("paused"):
activity = "paused"
kind = event["kind"]
message = MESSAGES.get(kind, kind.replace("_", " ").replace(":", ": ").capitalize() + ".")
if kind == "development_review_feedback" and record.get("paused"):
message = ("Recorded authorized development-PR change feedback. Repair remains pending, "
"but no Work was requested because the contribution is paused.")
elif kind == "command:pause":
pending = underlying_activity.replace("_", " ")
message = f"Paused automatic work. Pending lifecycle activity `{pending}` is retained until resume."
visible = f"**Upstreaming r{revision} · {phase}/{activity}** — {message} [Workflow run]({run_url})"
commands = _command_lines(record)
details = ""
Expand Down
8 changes: 8 additions & 0 deletions upstreaming/tests/test_generate_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ def test_render_links_and_orders_tracking_rows(self):
self.assertIn("Development (waiting for CI)", rendered)
self.assertEqual(rendered.count("\n| [example/"), 2)

def test_paused_state_is_primary_status_with_pending_activity_context(self):
self.assertEqual(generate_doc.status_label({"phase": "development", "activity": "fix_needed",
"paused": True}),
"Paused (Development; fix needed pending)")
self.assertEqual(generate_doc.status_label({"phase": "development", "activity": "idle",
"paused": True}),
"Paused (Development)")


if __name__ == "__main__":
unittest.main()
12 changes: 12 additions & 0 deletions upstreaming/tests/test_status_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,21 @@ def test_paused_feedback_ledger_does_not_claim_work_was_requested(self):
"review-1", NOW, True)
event["sequence"] = 14
body = status_ledger.render(event, record, "https://github.com/run")
self.assertTrue(body.startswith("**Upstreaming r8 · development/paused**"))
self.assertIn("Repair remains pending", body)
self.assertIn("no Work was requested because the contribution is paused", body)
self.assertNotIn("and requested repair", body)
self.assertNotIn("/upstreaming pause revision=8", body)
self.assertIn("/upstreaming resume revision=8", body)

def test_pause_event_explains_retained_pending_state(self):
record = contribution(phase="development", activity="fix_needed", revision=10, paused=True)
event = lifecycle._event(record, record, "command:pause", "command", "comment-1", NOW, False)
event["sequence"] = 15
body = status_ledger.render(event, record, "https://github.com/run")
self.assertTrue(body.startswith("**Upstreaming r10 · development/paused**"))
self.assertIn("Paused automatic work", body)
self.assertIn("Pending lifecycle activity `fix needed` is retained until resume", body)

def test_unpaused_feedback_ledger_reports_repair_request(self):
record = contribution(phase="development", activity="fix_needed", revision=8, paused=False)
Expand Down