[{"data":1,"prerenderedAt":855},["ShallowReactive",2],{"cycle-doc-qnative-c3-guide\u002F06-scenarios.md":3},{"cycle":4,"project":7,"path":10,"title":11,"toc":12,"ast":19},{"id":5,"title":6},"c3","Developer Mode",{"id":8,"label":9},"qnative","Qnative (provisional)","guide\u002F06-scenarios.md","Synthetic scenarios",[13,14,15,16,17,18],"Worlds","Conditions","Streams","The drill","Recording a real session into a scenario","Adding one",{"type":20,"children":21},"root",[22,36,41,46,142,148,170,311,316,321,326,460,486,491,505,547,596,633,713,718,738,743,748,761,766,784,789,794,850],{"type":23,"tag":24,"props":25,"children":26},"element","p",{},[27,34],{"type":23,"tag":28,"props":29,"children":30},"strong",{},[31],{"type":32,"value":33},"text","Standing:",{"type":32,"value":35}," three worlds are bundled today. Conditions, streams and the drill are proposals.",{"type":23,"tag":24,"props":37,"children":38},{},[39],{"type":32,"value":40},"Synthetic data is how every page is built before a sensor serves it, and how every state is tested after. The rule from the app's first day holds: synthetic data flows through the real pipes. A page never holds a fake value; it asks the same repository and gets an answer in the same shape.",{"type":23,"tag":24,"props":42,"children":43},{},[44],{"type":32,"value":45},"A synthetic choice has three parts.",{"type":23,"tag":47,"props":48,"children":49},"table",{},[50,74],{"type":23,"tag":51,"props":52,"children":53},"thead",{},[54],{"type":23,"tag":55,"props":56,"children":57},"tr",{},[58,64,69],{"type":23,"tag":59,"props":60,"children":61},"th",{},[62],{"type":32,"value":63},"Part",{"type":23,"tag":59,"props":65,"children":66},{},[67],{"type":32,"value":68},"What it is",{"type":23,"tag":59,"props":70,"children":71},{},[72],{"type":32,"value":73},"Chosen on the Sensor page as",{"type":23,"tag":75,"props":76,"children":77},"tbody",{},[78,100,121],{"type":23,"tag":55,"props":79,"children":80},{},[81,90,95],{"type":23,"tag":82,"props":83,"children":84},"td",{},[85],{"type":23,"tag":28,"props":86,"children":87},{},[88],{"type":32,"value":89},"World",{"type":23,"tag":82,"props":91,"children":92},{},[93],{"type":32,"value":94},"the data at rest: what was found on one machine, on one day",{"type":23,"tag":82,"props":96,"children":97},{},[98],{"type":32,"value":99},"a name",{"type":23,"tag":55,"props":101,"children":102},{},[103,111,116],{"type":23,"tag":82,"props":104,"children":105},{},[106],{"type":23,"tag":28,"props":107,"children":108},{},[109],{"type":32,"value":110},"Condition",{"type":23,"tag":82,"props":112,"children":113},{},[114],{"type":32,"value":115},"what is going wrong between the app and its source",{"type":23,"tag":82,"props":117,"children":118},{},[119],{"type":32,"value":120},"none, or one fault",{"type":23,"tag":55,"props":122,"children":123},{},[124,132,137],{"type":23,"tag":82,"props":125,"children":126},{},[127],{"type":23,"tag":28,"props":128,"children":129},{},[130],{"type":32,"value":131},"Stream",{"type":23,"tag":82,"props":133,"children":134},{},[135],{"type":32,"value":136},"what plays on Live and Events",{"type":23,"tag":82,"props":138,"children":139},{},[140],{"type":32,"value":141},"a script and a speed",{"type":23,"tag":143,"props":144,"children":146},"h2",{"id":145},"worlds",[147],{"type":32,"value":13},{"type":23,"tag":24,"props":149,"children":150},{},[151,153,160,162,168],{"type":32,"value":152},"A world is one file, ",{"type":23,"tag":154,"props":155,"children":157},"code",{"className":156},[],[158],{"type":32,"value":159},"crates\u002Ffixtures\u002Fworld\u002F\u003Cname>.json",{"type":32,"value":161},": the answers qdash's own handlers gave for every request the pages make, for one machine of the Meridian seed. ",{"type":23,"tag":154,"props":163,"children":165},{"className":164},[],[166],{"type":32,"value":167},"scripts\u002Fcut-world.py",{"type":32,"value":169}," cuts it.",{"type":23,"tag":47,"props":171,"children":172},{},[173,192],{"type":23,"tag":51,"props":174,"children":175},{},[176],{"type":23,"tag":55,"props":177,"children":178},{},[179,183,187],{"type":23,"tag":59,"props":180,"children":181},{},[182],{"type":32,"value":89},{"type":23,"tag":59,"props":184,"children":185},{},[186],{"type":32,"value":68},{"type":23,"tag":59,"props":188,"children":189},{},[190],{"type":32,"value":191},"Standing",{"type":23,"tag":75,"props":193,"children":194},{},[195,217,238,259,281],{"type":23,"tag":55,"props":196,"children":197},{},[198,207,212],{"type":23,"tag":82,"props":199,"children":200},{},[201],{"type":23,"tag":154,"props":202,"children":204},{"className":203},[],[205],{"type":32,"value":206},"meridian-day90",{"type":23,"tag":82,"props":208,"children":209},{},[210],{"type":32,"value":211},"the default; being recut to a quiet laptop (design c131 D15)",{"type":23,"tag":82,"props":213,"children":214},{},[215],{"type":32,"value":216},"bundled",{"type":23,"tag":55,"props":218,"children":219},{},[220,229,234],{"type":23,"tag":82,"props":221,"children":222},{},[223],{"type":23,"tag":154,"props":224,"children":226},{"className":225},[],[227],{"type":32,"value":228},"minimal",{"type":23,"tag":82,"props":230,"children":231},{},[232],{"type":32,"value":233},"one harness, a few sessions",{"type":23,"tag":82,"props":235,"children":236},{},[237],{"type":32,"value":216},{"type":23,"tag":55,"props":239,"children":240},{},[241,250,255],{"type":23,"tag":82,"props":242,"children":243},{},[244],{"type":23,"tag":154,"props":245,"children":247},{"className":246},[],[248],{"type":32,"value":249},"fresh",{"type":23,"tag":82,"props":251,"children":252},{},[253],{"type":32,"value":254},"day 0: installed, nothing found yet",{"type":23,"tag":82,"props":256,"children":257},{},[258],{"type":32,"value":216},{"type":23,"tag":55,"props":260,"children":261},{},[262,271,276],{"type":23,"tag":82,"props":263,"children":264},{},[265],{"type":23,"tag":154,"props":266,"children":268},{"className":267},[],[269],{"type":32,"value":270},"pilot",{"type":23,"tag":82,"props":272,"children":273},{},[274],{"type":32,"value":275},"priya's laptop on day 90: the machine where things happen",{"type":23,"tag":82,"props":277,"children":278},{},[279],{"type":32,"value":280},"ruled, not yet cut",{"type":23,"tag":55,"props":282,"children":283},{},[284,301,306],{"type":23,"tag":82,"props":285,"children":286},{},[287,293,295],{"type":23,"tag":154,"props":288,"children":290},{"className":289},[],[291],{"type":32,"value":292},"first-week",{"type":32,"value":294},", ",{"type":23,"tag":154,"props":296,"children":298},{"className":297},[],[299],{"type":32,"value":300},"power-user",{"type":23,"tag":82,"props":302,"children":303},{},[304],{"type":32,"value":305},"usage at two extremes",{"type":23,"tag":82,"props":307,"children":308},{},[309],{"type":32,"value":310},"named, not yet cut",{"type":23,"tag":24,"props":312,"children":313},{},[314],{"type":32,"value":315},"The page lists whatever worlds are bundled. It names none itself.",{"type":23,"tag":143,"props":317,"children":319},{"id":318},"conditions",[320],{"type":32,"value":14},{"type":23,"tag":24,"props":322,"children":323},{},[324],{"type":32,"value":325},"A condition wraps the source. The page underneath does not know; it receives the error a real source would give and draws its real state.",{"type":23,"tag":47,"props":327,"children":328},{},[329,349],{"type":23,"tag":51,"props":330,"children":331},{},[332],{"type":23,"tag":55,"props":333,"children":334},{},[335,339,344],{"type":23,"tag":59,"props":336,"children":337},{},[338],{"type":32,"value":110},{"type":23,"tag":59,"props":340,"children":341},{},[342],{"type":32,"value":343},"What the source does",{"type":23,"tag":59,"props":345,"children":346},{},[347],{"type":32,"value":348},"The state it exercises",{"type":23,"tag":75,"props":350,"children":351},{},[352,370,388,406,424,442],{"type":23,"tag":55,"props":353,"children":354},{},[355,360,365],{"type":23,"tag":82,"props":356,"children":357},{},[358],{"type":32,"value":359},"not running",{"type":23,"tag":82,"props":361,"children":362},{},[363],{"type":32,"value":364},"no lock file",{"type":23,"tag":82,"props":366,"children":367},{},[368],{"type":32,"value":369},"\"no sensor on this machine\"",{"type":23,"tag":55,"props":371,"children":372},{},[373,378,383],{"type":23,"tag":82,"props":374,"children":375},{},[376],{"type":32,"value":377},"stale",{"type":23,"tag":82,"props":379,"children":380},{},[381],{"type":32,"value":382},"a lock file whose pid is dead",{"type":23,"tag":82,"props":384,"children":385},{},[386],{"type":32,"value":387},"Found fails; \"start the monitor\"",{"type":23,"tag":55,"props":389,"children":390},{},[391,396,401],{"type":23,"tag":82,"props":392,"children":393},{},[394],{"type":32,"value":395},"slow",{"type":23,"tag":82,"props":397,"children":398},{},[399],{"type":32,"value":400},"answers after a delay",{"type":23,"tag":82,"props":402,"children":403},{},[404],{"type":32,"value":405},"loading, then content",{"type":23,"tag":55,"props":407,"children":408},{},[409,414,419],{"type":23,"tag":82,"props":410,"children":411},{},[412],{"type":32,"value":413},"refusing",{"type":23,"tag":82,"props":415,"children":416},{},[417],{"type":32,"value":418},"403, or 503 on the stream",{"type":23,"tag":82,"props":420,"children":421},{},[422],{"type":32,"value":423},"Refused, with what to change",{"type":23,"tag":55,"props":425,"children":426},{},[427,432,437],{"type":23,"tag":82,"props":428,"children":429},{},[430],{"type":32,"value":431},"wrong shape",{"type":23,"tag":82,"props":433,"children":434},{},[435],{"type":32,"value":436},"an answer that does not match its type",{"type":23,"tag":82,"props":438,"children":439},{},[440],{"type":32,"value":441},"a named shape error, never a blank",{"type":23,"tag":55,"props":443,"children":444},{},[445,450,455],{"type":23,"tag":82,"props":446,"children":447},{},[448],{"type":32,"value":449},"lagging",{"type":23,"tag":82,"props":451,"children":452},{},[453],{"type":32,"value":454},"the stream falls behind and is cut",{"type":23,"tag":82,"props":456,"children":457},{},[458],{"type":32,"value":459},"Lost; the gap is shown",{"type":23,"tag":24,"props":461,"children":462},{},[463,468,470,476,478,484],{"type":23,"tag":28,"props":464,"children":465},{},[466],{"type":32,"value":467},"Built in Phase 2 (2026-11-11):",{"type":32,"value":469}," ",{"type":23,"tag":154,"props":471,"children":473},{"className":472},[],[474],{"type":32,"value":475},"nozzle::scenario::Conditioned",{"type":32,"value":477}," wraps any nozzle, in six conditions: healthy, not-running, slow (2.5 s), unavailable (REST answers, the stream gets a 503), shape-mismatch (the repository's own decode fails; the stream sends unreadable records), lag-then-cut (600 records, then cut in qdash's words, then a fresh resync). Choose one on Dev › Source or with ",{"type":23,"tag":154,"props":479,"children":481},{"className":480},[],[482],{"type":32,"value":483},"QPOINT_CONDITION",{"type":32,"value":485},"; the footer names it. The drill (c131 D15: injecting one of three bad events) is not built yet.",{"type":23,"tag":143,"props":487,"children":489},{"id":488},"streams",[490],{"type":32,"value":15},{"type":23,"tag":24,"props":492,"children":493},{},[494,496,503],{"type":32,"value":495},"A stream script is recorded events in the envelope the sensor sends today (",{"type":23,"tag":497,"props":498,"children":500},"a",{"href":499},"\u002Fcycles\u002Fqnative\u002Fc3\u002Fdoc\u002Fguide\u002F03-live-activity",[501],{"type":32,"value":502},"Live Activity",{"type":32,"value":504},"), one JSON object per line. It is replayed through the same frame parser a live stream uses, at a chosen speed, with timestamps shifted to now.",{"type":23,"tag":24,"props":506,"children":507},{},[508,513,515,521,523,529,531,537,539,545],{"type":23,"tag":28,"props":509,"children":510},{},[511],{"type":32,"value":512},"Built in Phase 1 (2026-11-11):",{"type":32,"value":514}," four generated scripts, not yet recordings. They live in ",{"type":23,"tag":154,"props":516,"children":518},{"className":517},[],[519],{"type":32,"value":520},"crates\u002Ffixtures\u002Fsrc\u002Fstreams.rs",{"type":32,"value":522},", written to qevents' payload shapes as read from code (",{"type":23,"tag":154,"props":524,"children":526},{"className":525},[],[527],{"type":32,"value":528},"..\u002Fresearch\u002Fqevents-payloads.md",{"type":32,"value":530},"). Each is seeded and deterministic, and opens with the monitor's resync (",{"type":23,"tag":154,"props":532,"children":534},{"className":533},[],[535],{"type":32,"value":536},"installation.snapshot",{"type":32,"value":538},", then ",{"type":23,"tag":154,"props":540,"children":542},{"className":541},[],[543],{"type":32,"value":544},"process.snapshot",{"type":32,"value":546},"):",{"type":23,"tag":548,"props":549,"children":550},"ul",{},[551,563,574,585],{"type":23,"tag":552,"props":553,"children":554},"li",{},[555,561],{"type":23,"tag":154,"props":556,"children":558},{"className":557},[],[559],{"type":32,"value":560},"quiet",{"type":32,"value":562},", 0.5 a second;",{"type":23,"tag":552,"props":564,"children":565},{},[566,572],{"type":23,"tag":154,"props":567,"children":569},{"className":568},[],[570],{"type":32,"value":571},"coding-session",{"type":32,"value":573},", 8 a second (the default);",{"type":23,"tag":552,"props":575,"children":576},{},[577,583],{"type":23,"tag":154,"props":578,"children":580},{"className":579},[],[581],{"type":32,"value":582},"mcp-heavy",{"type":32,"value":584},", 20 a second;",{"type":23,"tag":552,"props":586,"children":587},{},[588,594],{"type":23,"tag":154,"props":589,"children":591},{"className":590},[],[592],{"type":32,"value":593},"file-storm",{"type":32,"value":595},", 500 a second (the stress case).",{"type":23,"tag":24,"props":597,"children":598},{},[599,601,607,609,615,617,623,625,631],{"type":32,"value":600},"They play through ",{"type":23,"tag":154,"props":602,"children":604},{"className":603},[],[605],{"type":32,"value":606},"nozzle::stream::play",{"type":32,"value":608},", the same subscription the sensor's stream uses. The condition and the stream are one per process (",{"type":23,"tag":154,"props":610,"children":612},{"className":611},[],[613],{"type":32,"value":614},"nozzle::scenario",{"type":32,"value":616},"). Until the Sensor page (Phase 2), set them with ",{"type":23,"tag":154,"props":618,"children":620},{"className":619},[],[621],{"type":32,"value":622},"QPOINT_STREAM=\u003Cscript>[@\u003Crate>]",{"type":32,"value":624}," and ",{"type":23,"tag":154,"props":626,"children":628},{"className":627},[],[629],{"type":32,"value":630},"QPOINT_CONDITION=\u003Chealthy|not-running|slow|unavailable|shape-mismatch|lag-then-cut>",{"type":32,"value":632},". The values in the scripts are invented; a recording of a real session replaces them.",{"type":23,"tag":47,"props":634,"children":635},{},[636,652],{"type":23,"tag":51,"props":637,"children":638},{},[639],{"type":23,"tag":55,"props":640,"children":641},{},[642,647],{"type":23,"tag":59,"props":643,"children":644},{},[645],{"type":32,"value":646},"Script",{"type":23,"tag":59,"props":648,"children":649},{},[650],{"type":32,"value":651},"What it is for",{"type":23,"tag":75,"props":653,"children":654},{},[655,668,681,694],{"type":23,"tag":55,"props":656,"children":657},{},[658,663],{"type":23,"tag":82,"props":659,"children":660},{},[661],{"type":32,"value":662},"quiet day",{"type":23,"tag":82,"props":664,"children":665},{},[666],{"type":32,"value":667},"the default: a little of everything, slowly",{"type":23,"tag":55,"props":669,"children":670},{},[671,676],{"type":23,"tag":82,"props":672,"children":673},{},[674],{"type":32,"value":675},"coding session",{"type":23,"tag":82,"props":677,"children":678},{},[679],{"type":32,"value":680},"a harness at work: model requests, tool calls, file reads",{"type":23,"tag":55,"props":682,"children":683},{},[684,689],{"type":23,"tag":82,"props":685,"children":686},{},[687],{"type":32,"value":688},"MCP-heavy",{"type":23,"tag":82,"props":690,"children":691},{},[692],{"type":32,"value":693},"sessions that lean on MCP servers",{"type":23,"tag":55,"props":695,"children":696},{},[697,702],{"type":23,"tag":82,"props":698,"children":699},{},[700],{"type":32,"value":701},"file storm",{"type":23,"tag":82,"props":703,"children":704},{},[705,711],{"type":23,"tag":154,"props":706,"children":708},{"className":707},[],[709],{"type":32,"value":710},"file.*",{"type":32,"value":712}," at a high rate; the stress case for the buffer and for coalescing",{"type":23,"tag":143,"props":714,"children":716},{"id":715},"the-drill",[717],{"type":32,"value":16},{"type":23,"tag":24,"props":719,"children":720},{},[721,723,728,730,736],{"type":32,"value":722},"Design c131 D15: on the ",{"type":23,"tag":154,"props":724,"children":726},{"className":725},[],[727],{"type":32,"value":270},{"type":32,"value":729}," world a ",{"type":23,"tag":154,"props":731,"children":733},{"className":732},[],[734],{"type":32,"value":735},"drill",{"type":32,"value":737}," injects one bad event into the stream, so a person can watch what a violation looks like. Three are ruled: code pasted to an outside site, a secrets file opened, and credentials read followed by traffic to an unknown host. On the Sensor page these are the Violations family.",{"type":23,"tag":143,"props":739,"children":741},{"id":740},"recording-a-real-session-into-a-scenario",[742],{"type":32,"value":17},{"type":23,"tag":24,"props":744,"children":745},{},[746],{"type":32,"value":747},"Today, with a sensor running, this captures its stream to a file in the script format:",{"type":23,"tag":749,"props":750,"children":756},"pre",{"className":751,"code":752,"language":753,"meta":754,"style":755},"language-bash","curl -N http:\u002F\u002F127.0.0.1:7878\u002Fapi\u002Fevents\u002Fstream | sed -n 's\u002F^data: \u002F\u002Fp' > session.jsonl\n","bash","","undefined",[757],{"type":23,"tag":154,"props":758,"children":759},{"__ignoreMap":754},[760],{"type":32,"value":752},{"type":23,"tag":24,"props":762,"children":763},{},[764],{"type":32,"value":765},"Use the URL from the lock file if the port is not 7878.",{"type":23,"tag":24,"props":767,"children":768},{},[769,774,776,782],{"type":23,"tag":28,"props":770,"children":771},{},[772],{"type":32,"value":773},"A recording is real data.",{"type":32,"value":775}," It holds prompts, file paths and whatever else passed through the sensor while it ran, and ",{"type":23,"tag":154,"props":777,"children":779},{"className":778},[],[780],{"type":32,"value":781},"installation.details",{"type":32,"value":783}," can hold secrets. Never commit a raw recording. Record a session staged for the purpose, read it before it leaves your machine, and scrub what should not travel.",{"type":23,"tag":24,"props":785,"children":786},{},[787],{"type":32,"value":788},"When Live is built, a recording can be dropped onto it to be read like a live stream, and saved from there as a script.",{"type":23,"tag":143,"props":790,"children":792},{"id":791},"adding-one",[793],{"type":32,"value":18},{"type":23,"tag":548,"props":795,"children":796},{},[797,822,840],{"type":23,"tag":552,"props":798,"children":799},{},[800,805,807,812,814,820],{"type":23,"tag":28,"props":801,"children":802},{},[803],{"type":32,"value":804},"A world:",{"type":32,"value":806}," run ",{"type":23,"tag":154,"props":808,"children":810},{"className":809},[],[811],{"type":32,"value":167},{"type":32,"value":813}," against the seed for another machine or day, add the file to ",{"type":23,"tag":154,"props":815,"children":817},{"className":816},[],[818],{"type":32,"value":819},"crates\u002Ffixtures\u002Fworld\u002F",{"type":32,"value":821},", and add its name to the bundled list. The fixtures test checks every answer against its type.",{"type":23,"tag":552,"props":823,"children":824},{},[825,830,832,838],{"type":23,"tag":28,"props":826,"children":827},{},[828],{"type":32,"value":829},"A stream:",{"type":32,"value":831}," add the ",{"type":23,"tag":154,"props":833,"children":835},{"className":834},[],[836],{"type":32,"value":837},".jsonl",{"type":32,"value":839}," beside the worlds. Every line must parse as the envelope.",{"type":23,"tag":552,"props":841,"children":842},{},[843,848],{"type":23,"tag":28,"props":844,"children":845},{},[846],{"type":32,"value":847},"A condition:",{"type":32,"value":849}," one case in the wrapper, and a story for the state it produces.",{"type":23,"tag":851,"props":852,"children":853},"style",{},[854],{"type":32,"value":754},1794599453005]