potiuk opened a new pull request, #343:
URL: https://github.com/apache/airflow-steward/pull/343

   ## Summary
   
   Adds an optional Step 6b at session end that proposes appending each triage 
session's stats to a long-lived **private** GitHub gist on the maintainer's 
account. The gist URL persists in a gitignored adopter-repo file 
(`.apache-steward.session-state.json`) so subsequent runs update the same gist 
rather than creating a new one each time.
   
   The signal motivating this: a single triage session shows what happened this 
morning, but only a multi-session history reveals which rules consistently fire 
with no override and which heuristics need recalibration. That second view is 
the input for promoting "human-confirmed" actions to "automated" in future 
framework revisions.
   
   ## What's added
   
   - **`SKILL.md` — new Step 6b** after the on-screen summary. Soft-fails to a 
one-line notice when the `gh` token lacks `gist` scope, or when `no-history` / 
`dry-run` is active.
   - **`session-history.md` — new reference file** documenting:
     - local state-file location and JSON schema 
(`.apache-steward.session-state.json` at adopter repo root, gitignored)
     - gist content schema (action counts, pre-filter breakdown, decision-rule 
signal table, per-PR override notes, deferrals)
     - create-vs-update logic
     - maintainer-confirmation flow (Y/N/E with full preview)
     - failure modes (deleted gist, public gist, malformed state JSON, 
concurrent worktrees)
     - privacy contract (no comment bodies, no diffs, no emails, no credentials)
   - **`prerequisites.md`** — non-blocking `gist` scope check with the exact 
`gh auth refresh -s gist` remediation command.
   - **`projects/_template/pr-management-config.md`** — new 
`session_history_gist` workflow choice (default `enabled`).
   - **`no-history` selector** in SKILL.md parameters.
   
   ## Privacy
   
   The gist is secret-by-default; the skill **refuses to write** to a gist that 
resolves as public via `gh api gists/<id> --jq .public`. The schema records 
action verbs and the maintainer's own override reasons — never PR comment 
bodies, diff snippets, author emails, or credential material.
   
   ## Origin
   
   Came out of a real triage session on `apache/airflow` (2026-05-27) where the 
maintainer (@potiuk) asked for cross-session calibration history. The original 
session's gist is the prototype the schema in `session-history.md` was 
distilled from.
   
   ## Test plan
   
   - [ ] First-run path: delete `.apache-steward.session-state.json`, run a 
triage session, confirm gist creation prompt shows correct preview, confirm 
state file written after gist creation
   - [ ] Steady-state path: re-run with state file in place, confirm prepend 
preview shows only the new session block
   - [ ] Soft-fail path: `gh auth refresh` to drop `gist` scope, run skill, 
confirm Step 6b skips with the documented one-line notice
   - [ ] Public-gist refusal: manually flip the test gist to public, re-run, 
confirm skill refuses with the documented notice
   - [ ] `no-history` flag: confirm Step 6b is unconditionally skipped
   
   🤖 Generated with [Claude Code (Opus 4.7)](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to