feat(scaffold): optional Open Scaffold handoff source (#48) - #57
Conversation
Add read-only, dependency-free Open Scaffold handoff discovery and a SessionStart plugin that injects bounded handoff context when .osc/ or MISSION.md are present. No osc subprocess, no MCP client connection. Doctor surfaces scaffold status; design doc records the relationship to the deterministic compaction digest (fallback/hot-path remains canonical). Closes #48
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66b7d59d1b
ℹ️ 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".
Per-candidate try/catch around readFile so a malformed preferred record (directory, bad permissions, broken symlink) falls through to the next candidate instead of disabling handoff injection entirely. Addresses Codex P2 review finding on PR #57.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 084664ebcd
ℹ️ 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".
Stat each handoff candidate and cap the disk read at 16 KiB so an accidentally huge .osc/handoff.md or MISSION.md cannot exhaust memory or stall startup before truncation is applied. Adds a regression test for the oversized case. Resolves P2 review thread on src/scaffold/handoff.js:24.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8b2a15b70
ℹ️ 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".
Address two P2 Codex review findings on src/scaffold/handoff.js: - Skip non-regular handoff candidates (FIFOs, device nodes, directories) before opening so a blocking special file cannot hang startup. - Decode only the bytes actually read (buffer.subarray(0, bytesRead)) so a short read or a file that shrank between stat and read cannot leak uninitialized Buffer memory into the injected system prompt. Adds a focused test for non-regular file fallback.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27505e01cc
ℹ️ 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".
readHandoffText used statSync (follows symlinks), so a MISSION.md or .osc/handoff.md symlink pointing at an absolute or ..-escaped file (e.g. $HOME/.ssh/config) would pass isFile() and have its target contents injected into the system prompt before any user approval. Switch to lstatSync and reject any candidate where lstat reports a symbolic link, so only real, repo-native files are accepted as handoff context. Adds two regression tests: an out-of-repo symlink escape and an in-repo symlink, both now rejected. Addresses P1 Codex review finding on PR #57.
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Scope
Out of scope
Verification
Risk
Linked issue
48
Authority boundary
draft/ready/review only; no merge/publish/release.