Commit 4460c24
committed
feat: a trigger may attach a standing instruction to its prompt (issue #60)
`run.instructions` is one line of operator text on a forge trigger, rendered
into the USER prompt's envelope: above the fenced data region, below the
harness's own numbered steps, and BEFORE the never-merge paragraph.
Label, comment and pull_request triggers carried no prompt text at all, so "for
this trigger specifically: the tests run with X, this repo's convention is Y"
had to be committed into the repo's SKILL.md or pushed into the deployment-wide
persona, which applies it to every job everywhere.
PLACEMENT IS ARGUED, NOT ASSUMED, because it is the whole of the change.
CONST-ISSUE-TEXT-IS-DATA governs event PAYLOADS. This is operator text from a
reviewed, git-tracked file, which passes the same mutability test
DES-FLOWS-ARE-DATA-PERSONA-IS-CODE already applies to the overlay persona:
"Mutability, not the persona/flow label, is the boundary."
Inside the fenced data region it would be DOCUMENTED TO BE IGNORED, since
dataRegion tells the model everything below its heading must be reported rather
than obeyed. In the system prompt it would work and be marginally cheaper per
turn, and is still refused: every other member of that layer is read from a
fixed file path once at loader build, which is the shape
CONST-PERSONA-IN-CACHED-PREFIX's acceptance leans on, and run.task is already
contracted user-prompt-only, so two operator text fields with two placements
would be an incoherence.
It sits BEFORE the never-merge paragraph because later text reads as more
specific, and the harness's non-negotiables must be the last thing before the
data region rather than something an operator instruction appears to qualify.
That costs nothing and forecloses the argument.
CONST-ISSUE-TEXT-IS-DATA gains one clause for the region it never described, in
the shape of the replay clause run.resume added, written as four checkable parts
rather than as a permission. This widens WHO may write an instruction, from the
flow author and the deploy-time operator to the same operator per trigger, and
not WHAT may become one.
dataRegion is UNCHANGED, which is the point: because the text lands in the
envelope, the shared export keeps its signature and the new-parameters-go-last
rule is honoured with no hole threaded through three sibling forges. They are
still edited, all three, because a gitlab trigger whose instruction was silently
dropped is the no-op this project refuses.
Refused on cron, naming run.task: a local job's prompt IS run.task, with no
envelope, no data heading and no fence, so there is no standing region distinct
from the task for a second field to occupy, and two fields writing one region
with an undefined order would both appear to work.
Capped at 2000 characters, refused rather than truncated. The caching argument
does NOT justify this and the spec says so: the text is written once,
session.prompt() is called once, and at the pin pi-ai attaches cache_control to
the LAST USER MESSAGE as well as the system prompt. What justifies it is a
context overflow inside a PAID container with no pre-spend signal, and keeping
the field in its lane, since anything longer belongs in the flow's SKILL.md or
the overlay persona. The refusal names both. Surrounding whitespace is NOT
refused, unlike run.image, because whitespace changes what an image REFERENCE
means and does not change what prose means; whitespace-only is.
No content filtering, and a comment says why: placement is the boundary and the
delimiter is defence in depth, so an operator who writes a fake data heading
into their own text has forged nothing -- the real heading is emitted after
theirs and still opens the real region. There is a test for exactly that.
No model-callable path: dispatch_trigger_add/_edit gain no parameter, on
run.resume's test rather than f.forge's, because standing text reaching every
future job of a trigger is a self-influence channel one confirm dialog does not
bound.
CONST-ISSUE-TEXT-IS-DATA AMENDED. NEW REQ-PER-TRIGGER-INSTRUCTION and
DES-TRIGGER-INSTRUCTION-IN-THE-ENVELOPE (five rejected placements recorded).
INT-TRIGGERS-FILE-CONTRACT, INT-CONTAINER-JOB-INPUTS: AMENDED.
CONST-PERSONA-IN-CACHED-PREFIX UNCHANGED, checked, and it records WHY the
obvious reading is wrong rather than borrowing an argument that does not apply.
CONST-TRIGGER-AUTHOR-GATE UNCHANGED, checked: the field changes how a job is
prompted, never whether it starts. CONST-ISOLATION-CONTAINER-PER-JOB,
INT-CONTAINER-RUNTIME-CONTRACT, CONST-BUDGET-BEFORE-TOKENS,
CONST-RETRY-INFRA-ONLY, INT-WEBHOOK-PAYLOAD-SUBSET, REQ-PER-TRIGGER-SKILLS,
DES-FLOWS-ARE-DATA-PERSONA-IS-CODE: UNCHANGED, checked.
Mutation-checked: moving the block below the never-merge paragraph turns the
last-word test red, and fencing it turns the not-fenced test red.
2069 tests, 0 failures, 0 skipped in the CI posture.
Signed-off-by: Rob Boerman <robboerman@live.nl>1 parent b0d1856 commit 4460c24
29 files changed
Lines changed: 523 additions & 58 deletions
File tree
- admin
- src
- test
- docs
- receiver
- src
- test
- specs
- worker
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
183 | 188 | | |
184 | 189 | | |
185 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
699 | 703 | | |
700 | 704 | | |
701 | 705 | | |
| |||
721 | 725 | | |
722 | 726 | | |
723 | 727 | | |
| 728 | + | |
724 | 729 | | |
725 | 730 | | |
726 | 731 | | |
727 | | - | |
| 732 | + | |
728 | 733 | | |
729 | | - | |
| 734 | + | |
730 | 735 | | |
731 | 736 | | |
732 | 737 | | |
| |||
738 | 743 | | |
739 | 744 | | |
740 | 745 | | |
| 746 | + | |
741 | 747 | | |
742 | 748 | | |
743 | 749 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
191 | | - | |
| 194 | + | |
192 | 195 | | |
193 | | - | |
| 196 | + | |
194 | 197 | | |
195 | | - | |
| 198 | + | |
196 | 199 | | |
197 | 200 | | |
198 | 201 | | |
199 | | - | |
| 202 | + | |
200 | 203 | | |
201 | 204 | | |
202 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
| 519 | + | |
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
92 | 113 | | |
93 | 114 | | |
94 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
| 205 | + | |
203 | 206 | | |
204 | 207 | | |
205 | 208 | | |
| |||
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
| 233 | + | |
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| 143 | + | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| |||
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| |||
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
| 204 | + | |
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
| |||
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| 236 | + | |
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| |||
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| |||
0 commit comments