Commit a65d518
fix(handoff): a quoted placeholder is resolved too — say so, and say how to quote one (#234)
* fix(handoff): a quoted placeholder is resolved too — say so, and say 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>
* docs(changelog): quote both diagnostics — the old one, and the line it 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>
---------
Signed-off-by: jitokim <pigberger70@gmail.com>
Co-authored-by: oh-my-graph <graphs@oh-my-graph.dev>1 parent 408b5d0 commit a65d518
3 files changed
Lines changed: 97 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
15 | 50 | | |
16 | 51 | | |
17 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
47 | 60 | | |
48 | 61 | | |
49 | 62 | | |
| |||
143 | 156 | | |
144 | 157 | | |
145 | 158 | | |
146 | | - | |
| 159 | + | |
147 | 160 | | |
148 | 161 | | |
149 | 162 | | |
| |||
167 | 180 | | |
168 | 181 | | |
169 | 182 | | |
170 | | - | |
| 183 | + | |
171 | 184 | | |
172 | 185 | | |
173 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
106 | 153 | | |
107 | 154 | | |
108 | 155 | | |
| |||
0 commit comments