Repository navigation
Description
Finding
PR #3096 (merged, head 1b0327c346) removed the pipe stage's " -\n" replacement on the grounds that the dead literal replaces never matched. That is true of " -$", but " -\n" was functional: it substituted a mid-line - placeholder that is followed by a newline (a form a substitution can produce). Without it, a newline-separated mid-line placeholder is no longer substituted — the content is appended at the end instead and the literal - stays in the command, which the stdin-content handler then rejects, so nothing is stored. Codex raised this as a P2 on the PR (comment 4432995820); it was never replied to, and the PR's final Codex review state on the merged head is has_unresolved_findings: true.
Evidence
- PR: fix(id/repl): reject trailing "-" content placeholders (#2280) #3096 — merged 2026-11-01, merge commit
d00c6d10aafb479cc92d6ae85b8b78f04c3cba54, final head1b0327c3467ddb1b366d6c7b6f7e1aa8a82755eb. - Current main (
d1de7ee86):pkgs/id/src/repl/input.rs:639— the pipe stage substitutes onlyright.replace(" - ", ...); when no marker is produced, the fallback atinput.rs:641-645appends__STDIN_CONTENT__:<output>at the very end of the right side. - Codex example:
echo hi |> $(printf 'put -\n name')previously producedReady("put __STDIN_CONTENT__:hi\n name"), whichhandle_stdin_contentaccepts and stores undername. On current main it producesReady("put -\n name __STDIN_CONTENT__:hi"), whose prefix that handler rejects as an unknown command, so nothing is stored. - Verified still present on current main by reading the pipe stage at
pkgs/id/src/repl/input.rs:627-649— no" -\n"(or equivalent newline-boundary) case exists. - Dedupe: searched open + closed issues for
3096 placeholder,pipe placeholder newline(2026-11-02) — only the parent fix id(repl): the trailing '-' content placeholder is never substituted — the ' -$' replace is a literal pattern, so here-string, pipe and heredoc content addressed to a trailing '-' is silently dropped #2280 (closed) matches; it does not cover this regression.
Why it matters
A supported placeholder form silently changed meaning in a merged PR: content that used to be stored under the intended name now makes the whole command fail downstream with an unrelated "unknown command" error. Either the form should keep working, or it should be rejected at preprocessing with the clear placeholder diagnostic — the current fall-through does neither.
Acceptance criteria
echo hi |> $(printf 'put -\n name')once again yields aReadyline thathandle_stdin_contentaccepts and stores undername(placeholder substituted in place), OR the form is rejected during preprocessing with the trailing/misplaced-placeholder diagnostic — with the chosen behavior pinned by a test.- A regression test covers a mid-line placeholder followed by a newline in the pipe stage.
- Existing fix(id/repl): reject trailing "-" content placeholders (#2280) #3096 tests still pass (trailing placeholders still rejected before execution; mid-line space-separated placeholders unchanged).
cargo test --lib repl::passes in CI.
Activity
dezren39 commentedon Nov 2, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 2, 2026
🤖 Agent note · picked up
" -\n"pipe-stage replacement) against current main, then routing the fix.3 remaining items
dezren39 commentedon Nov 2, 2026
Intake review
Related: PR #3096 (merged 2026-11-01, head 1b0327c) — the removing PR; its final Codex review state was has_unresolved_findings: true, and this is that unaddressed P2, filed by pr-diff-review.
Notes: Fully labelled at filing; acceptance criteria + meta/enriched only.
Risks: restoring the replacement must not resurrect the dead-literal behavior for end-of-line placeholders — the test should pin the newline-separated mid-line case specifically.
Suggested approach: re-add only the
-\narm in the pipe stage at pkgs/id/src/repl/input.rs, with the regression test.— fleet monitor intake enrichment, 2026-11-02.
dezren39 commentedon Nov 2, 2026
agent-note:v1
task 6311 picked up by lane code-j (repo-worker-code, direct lane). Revalidated fresh: issue #4428 OPEN, no held/user-owned/do-not labels, PR #3096 MERGED (the regression source), no competing fix PR found. Next: laptop worktree, restore " -\n" pipe substitution in pkgs/id/src/repl/input.rs + regression test, keeping #3096 trailing rejection intact.
Merge pull request #4524 from developing-today/queue/6311-4428-pipe-n…
dezren39 commentedon Nov 2, 2026
agent-note:v1
task 6311 done (fixed_merged) by lane code-j. PR #4524 merged (merge commit c208824): restored the pipe stage newline replace in pkgs/id/src/repl/input.rs (" -\n" -> marker + newline, before the " - " replace) + regression test test_preprocess_pipe_newline_midline_placeholder_substitutes covering both the $(printf ...) end-to-end form and the direct form. Verified on laptop: pipe tests 6/6 (incl. both #3096 trailing-rejection tests), full repl:: suite 111/111. Guard check SUCCESS on PR #4524; no Codex findings posted; #3096 trailing rejection untouched.