Skip to content

Trials P-33 and P-34: which issue a pull request closes, and when an issue's content last changed (#184) - #241

Merged
don-petry merged 4 commits into
mainfrom
trials/p-33-p-34
Oct 20, 2026
Merged

don-petry merged 4 commits into
mainfrom
trials/p-33-p-34

Conversation

@don-petry

@don-petry don-petry commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Closes #184. By the working ruling on the issue (comment of 2026-10-19), through the trial skill, on the canary alone, as the Maintainer's own gh login; no token minted, no App, no workflow.

P-33, trials/P-33.json: pass. One issue (#36 on the canary), and five pull requests whose descriptions each said Closes #36: left a draft (#37); created a draft, marked ready, converted back, marked ready again (#38); merged to a base that is not the default (#39); closed unmerged (#40); open to a base that is not the default (#41). What GitHub answered, in the read the port will make:

Case closingIssuesReferences Note
draft, to main the issue read like an open one
open, to main the issue ReadyForReviewEvent ×2 and ConvertToDraftEvent ×1 on the timeline, each with its actor and time
closed unmerged, to main the issue a closed pull request keeps its reference; no counting by branch name is needed
merged, to a base that is not the default none a pull request to a base that is not the default branch carries no closing reference at all
open, to a base that is not the default none the same; §6's fallback applies, the issue Lifecycle serves the default branch only, which §4.1 already says of a stacked pull request retargeted at the default branch
merged, to main (#38, exchange 4) the issue, state: CLOSED the issue closed COMPLETED with closer the pull request on its timeline

The merged-on-main case: the canary's ruleset on main requires an approving review the Maintainer cannot give their own pull request, so, on the Maintainer's decision of 2026-10-20 in this session, the ruleset's enforcement was set to disabled for one merge and set back to active five seconds later; exchanges 3 and 4 record both, with the same conditions and rules before and after, and exchange 5 is the read that followed. The merge was a merge commit (gh pr merge --merge), which the active ruleset would have refused on three counts: it allows squash alone, needs an approving review, and needs the last push approved. One more observation the fixture holds: the reverse read from the issue (CrossReferencedEvent.willCloseTarget) says false for every pull request once the issue is closed, so the port reads the pull request's own closingIssuesReferences, never the issue's timeline, for the join.

P-34, trials/P-34.json: pass. One issue (#42), then a minute apart: the body edited, the title edited, a comment, a label, a close, a reopening. lastEditedAt and userContentEdits move for the body alone (21:16:22Z); the title's change is the timeline's RenamedTitleEvent (21:17:28Z) with its actor; updatedAt is the reopening's (21:21:54Z). So the content's time is read apart from updatedAt, as the newer of two reads, which the port computes: here 21:17:28Z; and ReopenedEvent names the Maintainer and when. The first body edit leaves two userContentEdits nodes, the older carrying the original content's time. The outsider's reopening was not tried: no outside account exists (#163's ruling), and the event's shape is the same with another actor, whose access P-32 reads from the association.

What the design learns is #240, "Design: what P-33 and P-34 showed of closing references, an issue's content time and a timeline's count": the non-default base (§6's fallback), the reverse read, lastEditedAt for the body alone, timelineItems.totalCount ignoring itemTypes, and the close trailing the merge by a second. No design text changes here.

Grounding. Four cells in sim/grounding.py: a_closing_reference_is_read_from_any_pull_request and who_changed_the_draft_flag_is_read to P-33, an_issues_content_time_is_read_apart and a_reopening_names_its_actor to P-34, each with a comment on what the fixture also shows. python3 -m tools.check_trials passes; no record changes.

Removed. The authorization header gh sent on each exchange, named in removed; the response headers off the allowlist, taken out by tools/redact_trial.py before anything was read. Nothing else.

Undone on the canary (step 8). The six branches trial/p-33-* deleted; pull requests #37 and #41 closed (#39 and #38 merged, #40 closed by the trial); issues #36 (closed by the merge) and #42 closed. The ruleset is active with its rules as they were. Left in place: the merge commit be2218f of #38 on the canary's main, with one file trial/p-33/open.md, which the ruleset's non-fast-forward rule keeps and a revert would need the ruleset disabled again; and the closed issues and pull requests, which hold nothing unredacted.

Reviews, one fix round on 7dbc787: fresh-context Claude review and security pass, AGY (gemini-3.8-flash) and Muse. Taken: P-33's query used a GraphQL fragment that tests/test_tools.py's reader of a cost measurement's roots read as root fields, so make verify failed on the branch; the reader now skips a fragment definition (the smaller fix; re-running the read could not reproduce #38 as open). The exchanges are in the order they happened (the restore before the read). The decision of 2026-10-20 and P-34's client log moved out of the pass conditions into the exchanges' call. The grounding comment names the reverse read's disagreement on a closed pull request. Muse, read late: a fixture emptied or inverted left every check green with its rules still grounded, so tests/test_tools.py::test_the_issue_fixtures_hold_what_grounds_the_four_rules now holds the content that grounds each rule, as the P-32 fixture is held; and the closing-reference rule's text says it is read on a pull request to the default branch, and that one to another base carries none. Not taken: a Passed on note in §6's rows, which no fixture row carries; recording the setup acts as exchanges, which gh pr create, gh pr ready and gh issue edit do not capture, so the acts are narrated in the exchanges' call and what GitHub holds of them is in the reads.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved accuracy for pull request closing references, draft-state changes, reopening activity, and issue content timestamps.
    • Corrected GraphQL parsing so fragment definitions and unrelated text do not affect detected root fields.
  • Tests

    • Added coverage validating issue and pull request activity across multiple states, branches, actors, and event timestamps.
    • Added evidence confirming expected behavior for pull request merges, issue closures, edits, renames, and reopenings.

don-petry and others added 2 commits October 20, 2026 16:31
…issue's content last changed (#184)

Two fixtures from the canary, through the Maintainer's login: P-33 passes, with the merged case on main after the ruleset was disabled for one merge and restored, and a base that is not the default carrying no reference; P-34 passes, with the body's time in lastEditedAt and the title's in the timeline. Four rules of the issue world are grounded.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ppened, the conditions as conditions, and a query with a fragment read

The review's fragment finding: the test that holds a cost measurement's repos read a GraphQL fragment's fields as root fields and failed; it now skips a fragment definition. P-33's restore and merged read are in time order; the decision of 2026-10-20 moved from the pass condition to the exchange's call; P-34's client log moved likewise; the grounding comment names the reverse read's disagreement on a closed pull request.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner October 20, 2026 21:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T22:08:37.168210Z b81b9e6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 48 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: combsmith/software-factory/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 93759c64-5a72-49ce-a89b-83fcdbefcc70
📥 Commits

Reviewing files that changed from the base of the PR and between 9aaeca7 and b81b9e6.

📒 Files selected for processing: 1
  • tests/test_tools.py

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: combsmith/software-factory/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3fbdc256-ec1c-497a-b865-9eb16a47b43d
📥 Commits

Reviewing files that changed from the base of the PR and between ead1e42 and 9aaeca7.

📒 Files selected for processing: 4
  • sim/grounding.py
  • tests/test_tools.py
  • trials/P-33.json
  • trials/P-34.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The PR adds trial evidence for pull-request closing references and issue history, links four grounding rules to the fixtures, and updates GraphQL root-field parsing for fragments and multiple operations.

Changes: Issue Fact Trials

Layer / File(s) Summary
Record P-33 and P-34 trial evidence
trials/P-33.json, trials/P-34.json
P-33 records pull-request closing references, draft transitions, ruleset changes, and merge results. P-34 records issue content timestamps and lifecycle events, including reopening actors.
Link issue rules to trial fixtures
sim/grounding.py, tests/test_tools.py
Four grounding rules now cite P-33 or P-34. A test checks the pull-request references, draft events, merge and closure state, issue timestamps, edit history, reopening data, and actors.

GraphQL Root Parsing

Layer / File(s) Summary
Parse operation root fields
tests/test_tools.py
The roots parser skips fragment definitions, limits field capture to the active operation, and accumulates root-level text outside selection sets.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 9aaec

No identified issue needs resolution before merging; proceed with normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies trials P-33 and P-34 and summarizes their main findings about pull-request closing issues and issue content-change timing.
Linked Issues check Passed Issue #184 coding requirements are met. trials/P-33.json records closing references and authors for default-branch draft, open, merged, and closed-unmerged pull requests. It records the no-reference…
Out of Scope Changes check Passed The changes stay within issue #184. The GraphQL root-field parser fix supports reading the P-33 cost-measurement query. The added test verifies the P-33 and P-34 grounding claims. The fixture files an…
Full details: Linked Issues check

Explanation

Issue #184 coding requirements are met. trials/P-33.json records closing references and authors for default-branch draft, open, merged, and closed-unmerged pull requests. It records the no-reference result for non-default bases and draft-state actors and times. It records the §6 fallback and design issue #240. trials/P-34.json separates body and title content times from updatedAt and records the reopening actor. sim/grounding.py links all four rules to the fixtures. tests/test_tools.py verifies the fixture content, ordering, states, actors, and grounding. The reported python3 -m tools.check_trials run passes.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #184. The GraphQL root-field parser fix supports reading the P-33 cost-measurement query. The added test verifies the P-33 and P-34 grounding claims. The fixture files and grounding declarations implement the linked trial requirements. No unrelated product behavior or unrelated files appear in the reviewed change summary.

Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…ontent, and the closing-reference rule qualified

Muse on the branch: a fixture emptied or inverted left every check green with its rules still grounded. A test now holds the content that grounds each of the four rules, and the rule on the closing reference says it is read on a pull request to the default branch, and that one to another base carries none.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9089b02eab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/test_tools.py
Codex on the pull request: a fragment on Query spread at the root could carry a root field the reader of a cost measurement's repos would not see. Such a fragment now fails the reader, as a second operation does; a fragment on another type is still skipped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trials P-33 and P-34: the closing reference and an issue's content time are readable

1 participant