fix(handoff): a quoted placeholder is resolved too — say so, and say how to quote one - #234
Merged
Merged
Conversation
…how to quote one
Both unresolvable-placeholder reasons speak as if the graph had meant the
token. `{{ inputs.demo }}` says "no such input was provided"; worse,
`{{ artifacts.nosuch }}` says "artifact not available (its producing node has
not completed)" — asserting a producing node that may not exist anywhere in
the graph. The commonest way to reach either is a prompt that MENTIONS the
syntax: quoting it from another graph, or explaining it to the model. That
prompt gets a diagnostic about wiring it never wrote, and the artifacts form
gets it late — `run --dry-run` deliberately skips artifact-side errors
(cmd/oh-my-graph/dryrun.go:117), so the false claim surfaces only once the
node has actually spawned and been paid for.
One extra line on both reasons, stating the rule and the remedy:
cannot resolve {{ inputs.demo }}: no such input was provided
note: every {{ ... }} in a prompt is resolved, including one that is only
being quoted or explained — to keep such text literal, break the two
braces apart ("{ {"), or pass the text in as an input or artifact instead
of writing it in the prompt
Appended at exactly the two sites the report reproduced (handoff.go:159 and
:171) and nowhere else: a filter on a feedback token and an unreadable
artifact file are real wiring bugs, where this advice would mislead.
Wording only. No escaping syntax, no flag, no change to what Interpolate
resolves — placeholderPattern is untouched.
The three tests fail without the change and print the old messages while
doing so:
--- FAIL: TestInterpolate_MissingInput
cannot resolve {{ inputs.nope }}: no such input was provided
--- FAIL: TestInterpolate_ArtifactNotYetAvailable
cannot resolve {{ artifacts.pending }}: artifact not available (its
producing node has not completed)
They assert the sentence by its own words rather than against quotingHint, so
an assertion cannot survive the sentence losing its rule or its remedy.
go build ./... clean; make test green (19 packages, -race -count=1);
make fmt-check clean.
Signed-off-by: jitokim <pigberger70@gmail.com>
Co-Authored-By: oh-my-graph <graphs@oh-my-graph.dev>
…t now carries
The Unreleased entry for the placeholder fix described the new sentence but
never showed either message, so a reader could not tell what actually changed
in the output. It now quotes both forms verbatim, and names the command they
were captured from:
go run ./cmd/oh-my-graph run /tmp/omg-repro-placeholder.yaml --dry-run
Old (209df64^, internal/handoff/handoff.go:146 and :170):
cannot resolve {{ inputs.demo }}: no such input was provided
cannot resolve {{ artifacts.nosuch }}: artifact not available (its
producing node has not completed)
New (handoff.go:159 and :183, the quotingHint constant at :56):
cannot resolve {{ inputs.demo }}: no such input was provided
note: every {{ ... }} in a prompt is resolved, including one that is only
being quoted or explained — to keep such text literal, break the two
braces apart ("{ {"), or pass the text in as an input or artifact instead
of writing it in the prompt
The quoted text was read back off the running binary, not copied from the
implementation report. CHANGELOG.md only — no code, no release, no tag, no
version bump.
Signed-off-by: jitokim <pigberger70@gmail.com>
Co-Authored-By: oh-my-graph <graphs@oh-my-graph.dev>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backlog #9, reproduced three times: a prompt that merely mentions
{{ inputs.x }}gets interpolated, and the failure reads as though the graph declared a placeholder it does not have.The prescription was decided in advance and is deliberately small — not a mechanism change, one diagnostic line. No new syntax, no new flag, no change to interpolation semantics.
The CHANGELOG quotes both messages, the old one and the line it now carries, so the improvement is checkable rather than asserted.
🤖 Generated with Claude Code