test: pin share-link salvage and agent input key resolution - #461
Draft
cursor[bot] wants to merge 1 commit into
Draft
test: pin share-link salvage and agent input key resolution#461cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Offline checks for the library paths Workflow.load / Workflow.run use: recover nodes+links from damaged #g=/#j=/#a= fragments, and refuse wired/ambiguous --input keys before any paid send. Co-authored-by: mikkel <mikkel@255bits.com>
Contributor
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
nanoodle | 7934962 | Commit Preview URL Branch Preview URL |
Sep 04 2026, 10:10 AM |
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.
Risky behavior now covered
Recent merges were EXAMPLES / placeholders / model announcements. The untested production paths with real blast radius sit in the shipped library (
vendor/njs-engine.js/ play njs-engine), not the gallery copy.Share salvage. Messenger truncation and gzip CRC flips are the common damaged-link case.
check-linkerr.mjsonly pins the play.html banner for garbage#a=;check-graph-persistence.mjsonly pins well-formed editor round-trips.decodeShareFragment/salvageGraph— whatWorkflow.loaduses to recovernodes+links— had no pin. A regression throws “link may be truncated” on a recoverable graph, or silently accepts#ga=(unstable editor handoff) as a share.Agent input keys.
Workflow.runresolves every--input/run({ … })key before any paid send. Mapping a friendly name onto the wrong upload, accepting a wired port as an override, or treating a stale Choice as “missing required” either posts the wrong media/prompt (charged) or dead-ends a graph the play page would have submitted.check-app-settings.mjsnever drivesresolveInputKey.Test files added/updated
scripts/check-share-salvage.mjs(new)scripts/check-agent-inputs.mjs(new)Pins, offline, zero API spend (real
NanoodleEngine):#j=/#g=/#a=ustay unrecovered; trailing-junk#j=and gzip-ok/JSON-broken#g=recover nodes+links (recovered: true); a prompt containing"links": []cannot steal the real links array; damaged#a=prefers the nestedgraphand drops files/name/lang; empty or untyped nodes rethrow the strict error;#ga=is refused;Workflow.loadstill salvages a damaged#j=.nodeId.field+ case-insensitive resolve on a local text run; ambiguous bare field; unknown key lists availables; wired llm prompt / ivideo setting refused before fetch; unwired inpaint keeps image+mask; empty/stale Choice defaults to the first option (not missing-required).Why these tests materially reduce regression risk
Salvage is the only path that turns a half-delivered share into a runnable graph. Losing string-aware extract, or treating empty
nodesas success, is silent data loss for everyone who pastes a long link. Input resolution is the only gate between an agent-supplied key and a charged NanoGPT body — a one-character drift inresolveInputKey/resolveSettingKeyis the wrong prompt or a wired override on a paid node.node scripts/check-share-salvage.mjsandnode scripts/check-agent-inputs.mjsare green. No production behavior change.