/** * Guidance for applying patterns and reporting evidence through the release boundary. */ export const REVISION_VERIFICATION_GUIDANCE = [ "For both creation and revision, distinguish applying source from inspecting its result. A successful run_pattern or revise_piece receipt establishes execution or an applied source update, not that a rule matched any rows or that a style is readable. Verify the requested effect when the existing tools and release rules allow it.", "For a classifier or filter, the pattern-author reads the current source and wires read_piece_source's inputRef into an ordinary run_pattern check. Use the piece's bound inputs and the same readers, query scope, and existing filters. Evaluate the OLD and NEW predicates on the SAME bounded sample in one computation before revising. Report pending, error, ready, sampleSize, beforeCount, afterCount, and changedCount (the number of rows whose inclusion changes, not just the difference between totals). pending is a boolean and error is null when no error was observed; ready means the read settled without an error, independently of sample size or changedCount. Check pending, errors, and outputConcerns first: an unsettled, refused, or unavailable read is not an empty sample. A sample establishes only the effect on those sampled rows.", "Return the comparison's resultRef as verificationRef on the pattern-author return, including the failure branch when a released check shows no effect. Keep the actual piece's resultRef separate. Counts, rows, sender names, and source text do not cross in that return. To read verificationRef, the parent passes it as an input to a minimal unnamed reader pattern through run_pattern. Its resultSchema must expose pending, error, ready, sampleSize, beforeCount, afterCount, and changedCount. Copy those fields unchanged: never default a missing pending or error field, missing readiness to true, or missing counts to zero. Under the existing release rules, use only the values actually released, never numbers asserted in a child's prose or inferred from a name.", "A pending comparison, including a pending outputConcern, is not a settled-empty result. Reread the same verificationRef once through that reader before interpreting its counts; do not author a replacement probe. If it remains pending, inspection is still unavailable, not a zero comparison. An observed query failure remains a failure to repair or report, not unavailable inspection. A policy refusal is final for that read and does not call for a reread.", "When a released, ready comparison shows zero changedCount or an empty sample, ask what should change instead of claiming the requested effect. The child returns the failure branch with verificationRef; only the parent asks the user. State the released finding (for example, excluded 0 of 37 sampled items) and ask which sender or kind of message should change. Do not invent examples that were not released or broaden the rule speculatively. For a released nonzero check, apply the tested rule and report only its sampled delta, subject to any refresh warning.", 'When result inspection is withheld by policy or verification is otherwise unavailable, apply the requested build or revision using the held inputs. If execution or the source update succeeds, the child returns ok: true with the actual piece resultRef and verification: "not-checked". Unavailable verification alone is not a failure branch or a reason to leave a revision unapplied. The parent states the limitation in the final text, describes only what was built or changed, and points the user to the piece. It must not assert unseen rows, counts, matches, unread status, or relevance scores. Do not repeat checks or delegate again to get around a release refusal, and never ask the user for a nonexistent permission to release aggregates or change the sink ceiling. Actual compile errors, refused writes, and observed query failures remain failures to repair or report.', "For a styling change, use a supplied observation of the computed surface the piece renders on, such as its pane background, when available. Source colors do not establish that surface. When no such observation or permitted tool is available, say the rendered appearance was not checked; do not claim a contrast or render check succeeded.", ].join("\n\n");