Skip to content

Stage proposed public issue text for validation before creation - #632

Merged
JacobStephens2 merged 2 commits into
issue-626from
issue-627
Oct 10, 2026
Merged

JacobStephens2 merged 2 commits into
issue-626from
issue-627

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

#627, first slice of the #626 security-fix publishing rework: the publishing session stages its proposed public issue text instead of creating the public issue directly, and thirdshift creates the needs-triage top issue from the staged text.

security-fix-publishing session (single public fix)
  final message: Proposed public issue: / Title: <t> / Body: <b>   (no gh issue create)
fixing::publish
  parse_staged_proposal -> GitHub::create_issue_in(repo, title, body, [needs-triage])
  existing checks (open, fresh, needs-triage-only, write-up leakage)
  mark ready (ready-for-agent + security-fix) -> dispatch Run

Spec and private-reuse flows keep the session-created path until staged specs land; the legacy Security fix Ticket: <URL> final line stays as fallback.

Seams under test: the security-fix publishing prompt (prompt::security_fix text); the security-fix publishing seam (security::fixing::publish staged branch plus GitHub::create_issue_in); the prompt catalog (prompts_page generated prompts/ + site/prompts/index.html).

Evidence

  • Before: session ran gh issue create itself; no staged-text path existed (parse_staged_proposal did not compile — red: error[E0425]: cannot find function parse_staged_proposal).
    After: cargo test --test security_run a_staged_proposal_is_created_by_thirdshift_not_the_session passes — the fake session never runs gh issue create, thirdshift creates issue 8 from the staged title/body, labels land security-fix + in-progress, and the fix Run dispatches to PR .../pull/1.
  • Full suite: cargo test green across all 44 test binaries (incl. 930 unit + 88 security_run), cargo fmt --check clean, cargo clippy --all-targets -- -D warnings clean.
  • Review: two-axis review vs issue-626 (reports in .thirdshift-review-pGFnDC/standards.md, spec.md); both axes read all six changed files, none unread.

Merge Danger

Door: two-way — revert the two commits; no data migration, no destructive action.

Blast Radius: security-fix publishing — only the single-public-fix path changes behaviour; legacy session-created path and spec/private flows untouched and still covered by the existing 88 security_run tests.

Unaddressed findings

Standards

  • src/security/fixing.rs legacy None arm growth (reviewer: extract if a third path ever joins; fine today). Deferred extraction point, no behaviour involved; refuted by the reviewer's own "today it is fine" plus single-reason scope (fixing changes for one reason only).
  • Fixed and not listed here: duplicated create_issue doc (now one line) and STAGED_* marker normalisation (both bare, trim at parse; rendered prompt byte-identical per prompts_page golden test).

Spec

  • Finding 1, validation timing (src/security/fixing.rs:85 creates before check_issue_text): rejected staged text still creates a public issue — verified by running the reviewer's a_rejected_staged_proposal_creates_no_public_issue as written, which FAILED with rejected staged text must not create a public issue: Object {"8": String("Private candidate write-up. Private record: ...GHSA-finding-0")}. Declined: pre-creation gating is the exact scope of open sibling #628 ("Validate the staged public issue text before any public creation"), so no new triage issue filed.
  • Finding 2, session authority (src/security/fixing.rs legacy None arm accepts Security fix Ticket: <URL>): a session-created ticket is still accepted — verified by running the reviewer's a_session_created_public_ticket_is_refused as written, which FAILED with left: Some(0), right: Some(1) (run succeeded). Declined: enforcement is the exact scope of open sibling #629 ("Remove independent public-issue creation from the publishing session"), so no new triage issue filed.

No changed file was left unread by the review (both axes report none unread).

Closes #627

Built with muse · default model · default effort

The security-fix publishing session now stages its proposed public
issue text (title + body) in its final message instead of creating the
public issue directly with gh issue create. thirdshift creates the
needs-triage top issue from the staged text via GitHub::create_issue_in,
then runs the existing checks (open, fresh, needs-triage-only,
write-up leakage) before marking it ready and dispatching the fix Run.

Single public fixes take the staged path; spec and private-reuse flows
keep the session-created path until staged specs land. The legacy
'Security fix Ticket: <URL>' final line stays as fallback.

Closes #627
@JacobStephens2
JacobStephens2 merged commit 483280f into issue-626 Oct 10, 2026
17 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-627 branch October 10, 2026 12:24
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.

1 participant