Skip to content

Prefer structured edit tools in source-editing Factory sessions - #763

Merged
JacobStephens2 merged 4 commits into
mainfrom
issue-734
Oct 17, 2026
Merged

JacobStephens2 merged 4 commits into
mainfrom
issue-734

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

Source-editing Session
  → prefer an available structured patch/edit tool
  → use the Harness's equivalent when available
  → allow code generation and narrowly justified scripts
  → scope replacements and check the diff

One shared paragraph in src/prompt.rs covers implementation, review and Repair sessions, including permitted exploratory edits. Regenerated the Markdown prompt examples and site's generated fragment from their sources.

Closes #734

Evidence

  • Before: cargo test --bin thirdshift source_editing_sessions_prefer_available_structured_tools_and_allow_scoped_scripts failed because the fresh Session prompt lacked the editing preference.
    After: The same test passes across all nine source-editing prompt variants; all three prompt tests pass, including exclusion checks for read-only sessions and Resumes that retain their original guidance.
  • Representative session edit: In a small Rust fixture with two identical values.push(7) statements, contextual apply_patch changed only the intended function to push(8). Before, its assertion failed ([7] versus [8]); after, compilation and both assertions passed, confirming the unrelated function still returned [7]. The Spec reviewer independently reran the fixture. This demonstrates this session's small edit; historical Tickets keep their repository from the sub-issue graph to the Run #672/E0308 evidence remains attributed to the retrospective, with no claim of measured productivity gains.
  • cargo check --all-targets, cargo fmt --check, and cargo clippy --all-targets -- -D warnings passed.
  • UPDATE_PROMPTS=1 cargo test prompts_page regenerated artifacts; all 11 rendering/reference checks pass on the reconciled branch, including the other session's matrix over all 15 prompt variants.
  • cargo test --test fresh_run --test ci --test mergeable passed all 52 integration tests.
  • The full cargo test suite passed on ed46f7c. Reconciliation with the concurrently published branch adds only a test in src/prompts_page.rs; production code and generated artifacts are identical to that full-suite run. Both structured-edit tests, all 11 prompt-reference checks, formatting and Clippy were rerun successfully after reconciliation.
  • cd site && npm test passed all four browser tests against the regenerated page.

Test seams

  • Session prompt rendering through src/prompt.rs's public prompt functions, including source-editing and read-only sessions.
  • Generated prompt references through the existing prompts_page artifact checks.
  • Representative context-scoped source edit through the available apply_patch tool, verified by the resulting diff and fixture assertions.

Review coverage

Independent Standards and Spec reviews against main found no findings. Both axes read every changed file (17 each); changed files left unread: none. Each report and its final files-read list is retained in the session's requested review directory.

Unaddressed findings

  • Standards: None.
  • Spec: None.
  • Security: None. Guidance review of ee154e853b9917bb9a84bb65248c0d57640ade14...d0f548dfbb1279cb4351a6aaf2dbf5c1f10f23f7 covered all 17 changed files and supporting prompt assembly, Harness argument handling and HTML/Markdown rendering, using the relevant attack-class guidance and trust-model ADRs. No introduced Security findings. In an isolated offline sandbox, cargo test --offline --locked --bin thirdshift prompts_page -- --test-threads=2 passed 11 tests and cargo test --offline --locked --bin thirdshift prompt::tests -- --test-threads=2 passed 3 tests. No source changes were needed.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Revert the paragraph and regenerate the references to restore the prior guidance.

Blast Radius: Sessions

Changes source-editing instructions across Harnesses. Adds no host dependency or installation step.

Built with codex · gpt-6.1-sol · high

@JacobStephens2
JacobStephens2 marked this pull request as draft October 17, 2026 17:11
@JacobStephens2
JacobStephens2 marked this pull request as ready for review October 17, 2026 17:13
@JacobStephens2
JacobStephens2 merged commit bf918a7 into main Oct 17, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-734 branch October 17, 2026 17:30
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 17, 2026
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.

Guide Factory sessions to use structured patch tools for source edits

1 participant