Repository navigation
docs: record the weave origin island (#388, closes #295) - #398
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
outside ±2048 cells and does not saturate, and the weaving replay case still hashes NullField. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
78c035f to
9498f0e
Compare
There was a problem hiding this comment.
Docs-only against main at 49d289eb. I checked the weave-origin claims against queue_weave / enqueue, meters_to_cell, compile_legacy, apply_weave_op, push_ice, weaving_case_bytes, and the mod host in sim_mod.rs.
The island gate matches the code. ISLAND_HALF_CELLS is 2048 inclusive. enqueue returns OutsideIsland and does not saturate (origins_outside_the_island_are_rejected_without_saturation keeps the edge origin [2048, 0, -2048] and leaves the count at 1). The script host uses i32::try_from and the same constant before it stores a cast. weaving_case_bytes still runs 300 ticks on NullField with origins [0,0,0], [2,0,0], [0,1,0], and [0,0,1], and NullField::field_digest is 32 zero bytes. A queued origin plus a u8 radius cannot overflow the milli product: (2048 + 255 + 1) * 1000 = 2_304_000. This diff adds no dependency and no unsafe.
#295 is closed by #388 and #260 is closed by #397. The Gate job does run scripts/ci/player_facing_names.sh. The comments below are places where the new text and the code disagree, or where a pin will send the next reader to the wrong line.
assets/cells/*.ron still contain Veilweaver in tags and in one description (100_0_0.ron). Both checkers skip that directory on purpose.
Sent by Cursor Automation: ASTRA PR AUDIT AGENT
There was a problem hiding this comment.
Adversarial pass on 9498f0e5 against main at 49d289eb. The diff is documentation only (six files, no sim, render, or dependency change). I checked the claims against the weave queue, the mod host, the replay helper, the Hi-Z record path, the frame-budget gate, and the GitHub issue timeline.
What holds:
queue_weavereturnsOutsideIslandfor any axis outside ±2048 and does not saturate.2048and-2048still enqueue.meters_to_cellrejects non-finite metres andm * 1000belowi32::MIN as f32or at or abovei32::MAX as f32before the cast, thendiv_euclid(-1.5is cell-2). The finitef32before2^31is2147483520.- The mod host checks the island before
WeaveCastis stored (sim_mod.rs).queue_weave_edges_fail_closedlocks the edge, the outside origin, and “valid cast then outside island drops the script” (command list empty).DEFAULT_MAX_WEAVESis 64.run_onereturnsErrbeforeapply_weave_casts. weaving_case_bytesstill runs onNullField.astraweave-core/tests/replay_hash.rshashes those bytes. This diff does not touch that path.astraweave-weavingis#![forbid(unsafe_code)].draw_intorecords Hi-Z only when bothhiz_depth_loadandsample_hizare set. The default ofsample_hizis false. Nodraw_intopass samplesHizPyramid::view.set_sample_hizdrops the pyramid when the flag changes.gpu_frame_budgetcallsreject_gated_flagsbefore the scene. Bare--name,--name=true, and--name truebail for the six gated flags.--name=falseand--name falsedo not. The binary never calls the gated setters, so the printed median stays the baseline frame.record_gated_presentationdoes not callcopy_to_historyfor SSGI, TAA, or upscale, and it does not copy those views ontohdr_tex.open_limited_image,Texture::from_file_with_usage, and the ktx2 fallback inset_smoke_test_texturestillstd::fs::readthe whole file.read_capped_imagerejects a regular file above 64 MiB from metadata before the read.- #295 closer is #388. #260 closer is #397. #269, #403, #400, #395, #371, and #372 are in the states the pages name. The intro companion line is thread-binder. The debrief
.ronfiles do not use the retired title. The Gate job runsscripts/ci/player_facing_names.sh. Trace-sync on this head is green. The rest of CI was still queued.
The runtime story is right. The audit map is not. The comments below are the mismatches: a security pin that predates the behavior it describes, a closed parser hole still marked off main, line numbers that do not land on the reject, a Hi-Z predicate shortened on three pages, a missing echoes.toml in the name gate, and a scripting-trace SHA that is not on main.
Sent by Cursor Automation: ASTRA PR AUDIT AGENT
A dropped wind returns from wind_direction before legacy_geometry_kept. A failed mod run drops only that agent's casts. SEC-MOD-2 is the range check already on main. The status pins name which sentences were checked at 49d289e. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
draw_into records the pyramid only when hiz_depth_load and sample_hiz are both set. The name gate includes echoes.toml. #269 was cross-referenced by #389. The close was not attributed. compile_legacy drop sites are the empty returns, not cell_origin. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
There was a problem hiding this comment.
Adversarial pass on d4893f86 against main at 49d289eb. The diff is documentation only (seven files, no sim, render, or dependency change). I checked the weave queue, the mod host, compile_legacy, apply_weave_op, push_ice, the replay helper, the Hi-Z record path, the frame-budget gate, the player-facing scans, and the GitHub close events.
What matches the code:
enqueuereturnsOutsideIslandfor any axis outside ±2048 and does not saturate the origin (mod_queue.rs:183-185).queue_weave(:215-225) returns that result.2048and-2048still enqueue.meters_to_cellrejects a non-finite metre, andm * 1000belowi32::MIN as f32or at or abovei32::MAX as f32, before the cast, thendiv_euclid(-1.5is cell-2). The finitef32before2^31is2147483520.compile_legacydrops at:55-57(a),:84-86(collapseb), and:97-99(wind delta).cell_originis:168-178.wind_delta_fitsis:155-166(1e-22stays;1e-23underflows to 0). A dropped fortify, collapse, lower, or freeze returns atlegacy_geometry_kept(astraweave-gameplay/src/weaving.rs:57-58) before the budget match at:60-73. A wind delta thatcompile_legacydrops returns fromwind_directionat:48-52. Kinds 0 and 4 build the director rect withax as i32(legacy.rs:70-76), so-1.5truncates to-1on that rect while the density write uses the floored cell.push_icedebug_asserts the island (eval.rs:233-238), multiplies unchecked, and stores the sheet at:250-259. The onlypush_icecall ispush_command.parse_template_tomlrejects an id outsideu16atmod_queue.rs:231-234beforeas u16. The test locks65536,-1, and65535. Radius (:276-279) and nodea(:286-289) check before the cast. SEC-MOD-2 and SEC-WEAVE-1 match main.- The mod host rejects the island at
sim_mod.rs:269-274before theWeaveCastis stored.apply_weave_castsis called from theOkarm at:383-396.DEFAULT_MAX_WEAVESis 64.weaving_case_bytesstill runs onNullField. This diff does not change a replay input. record_hizreturns unlesshiz_depth_loadandsample_hizare both set.sample_hizdefaults to false.set_sample_hizdrops the pyramid when the flag changes. Nodraw_intopass samplesHizPyramid::view. #295's closer is #388. #260's closer is #397. #269's closer is null, and #389 cross-referenced it. #403, #400, #395, #371, and #372 are open.- The Gate script and the dialogue test both name
echoes.toml. The test's npc and cinematics scan is oneread_dirlevel with no extension filter.assets/cells/100_0_0.ronstill says Veilweaver in the description and in theveilweavertag.gpu_frame_budgetcallsreject_gated_flagsbefore the scene.--name=falseand--name falsestay off.open_limited_image,Texture::from_file_with_usage, and the ktx2 fallback inset_smoke_test_texturestill call uncappedstd::fs::read.read_capped_imagerejects a regular file above 64 MiB from its metadata.record_gated_presentationdoes not callcopy_to_historyfor SSGI, TAA, or upscale, and it does not copy those views ontohdr_tex.
Two claims on this head are still wrong. A failed run_one drops that call's buffer, and an earlier script for the same agent stays applied. The scripting trace is stamped verified at 49d289eb while section 10 still says fifteen cross-OS cases; the workflow list has nineteen.
ENGINE_STATUS.md says "The default is off" after naming both Hi-Z flags. sample_hiz defaults to false. hiz_depth_load is depth_texture_load_supported at renderer init. Recording stays off because record_hiz requires both.
Earlier comments on the pin, SEC-MOD-2, the line map, the section stamp, the echoes scan, the #269 closer, and the two Hi-Z flags are addressed on this head.
Sent by Cursor Automation: ASTRA PR AUDIT AGENT
The tick walks scripts, then agents. An earlier Ok for the same agent stays applied. The new test locks that. The scripting trace now says nineteen replay cases, and sample_hiz is the flag that defaults off. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
There was a problem hiding this comment.
The per-call fail-closed claim now matches the host, and the new test passes. The trace stamp does not.
I checked the citations against the tree at 10ff3630. queue_weave returns OutsideIsland from enqueue (mod_queue.rs:183-185) for any axis outside the inclusive ±2048 cube and does not saturate. The script binding rejects that origin at sim_mod.rs:269-274 before the cast is written into WeaveBuf. run_one returns on the execute_deterministic error before it reads the scope buffer, and mod_script_system calls apply_weave_casts only on Ok (sim_mod.rs:383-396). Sources run in ModPrograms order, then entities sorted by id. An earlier Ok for the same agent stays. A later Err does not roll it back. queue_weave checks the island again. meters_to_cell, compile_legacy (legacy.rs:55-57, :84-86, :97-99), wind_delta_fits, the budget returns in apply_weave_op (weaving.rs:48-52 and :57-58 before :60-73), and push_ice (eval.rs:233-238, sheet :250-259, nav :260-265) match the sentences. parse_template_toml rejects an id outside u16 before the cast (mod_queue.rs:231-234); radius and node a do the same. Hi-Z records only when hiz_depth_load and sample_hiz are both set; sample_hiz defaults false. open_limited_image (image_limits.rs:35), Texture::from_file_with_usage, and the ktx2 fallback in set_smoke_test_texture still use uncapped std::fs::read. #295 closer is #388, #260 closer is #397, #269 closer is null with a cross-reference from #389. #403, #400, #395, #371, and #372 are open. assets/cells/100_0_0.ron still has Veilweaver in the description and the tag.
Determinism: this head does not change the sim path. weaving_case_bytes still hashes NullField. The nineteen-name list in determinism-replay.yml is unchanged. Replay hash on this head already succeeded for ubuntu-latest and macos-latest. No new unsafe, no wall clock, and no unseeded RNG.
cargo test -p astraweave-scripting --lib failed_script_keeps_an_earlier_ok_for_the_same_agent passed (1 passed).
The merge blocker is the verification stamp. docs/architecture/scripting.md is version 1.7 and names failed_script_keeps_an_earlier_ok_for_the_same_agent, but last_verified_commit is 49d289eb. That commit has doc version 1.5 and does not contain the test. The #397 bullet in ENGINE_STATUS.md repeats “the trace is 1.7” under a check pinned to 49d289eb. Revision 1.6 still records the agent-wide drop as verified at that commit. PROJECT_STATUS.md line 10, and the same sentence in ENGINE_STATUS.md line 71, still say the fifteen replay cases are unchanged.
Prior threads on the agent-wide rollback wording, the security-audit banner, and the section 10 count of fifteen are addressed on this head.
Sent by Cursor Automation: ASTRA PR AUDIT AGENT
The test queues a cast, a failing origin, then another cast, and compares two runs. #217 landed when the required replay set was fifteen. The required set is now nineteen. Revision 1.6 is withdrawn. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
There was a problem hiding this comment.
Adversarial pass on 37b6da35 against main at 49d289eb. The production sim path is unchanged. The only code edit is failed_script_keeps_an_earlier_ok_for_the_same_agent under #[cfg(test)]. No new dependency and no unsafe.
What I re-checked on this head:
enqueuereturnsOutsideIslandatmod_queue.rs:183-185for any axis outside the inclusive ±2048 cube and does not saturate.queue_weaveis the delegate at:215-225.meters_to_cellrejects a non-finite metre, andm * 1000belowi32::MIN as f32or at or abovei32::MAX as f32, before the cast, thendiv_euclid(-1.5is cell-2). The finitef32before2^31is2147483520.compile_legacydrops at:55-57,:84-86, and:97-99.wind_delta_fitsis:155-166(1e-22stays;1e-23underflows to+0). A dropped fortify, collapse, lower, or freeze returns atlegacy_geometry_kept(weaving.rs:57-58) before the budget match at:60-73. A dropped wind delta returns fromwind_directionat:48-52. Kinds 0 and 4 still truncate the director rect (legacy.rs:70-76); the density write uses the floored cell.push_icedebug_asserts the island and still stores the sheet.parse_template_tomlrange-checks the id atmod_queue.rs:231-234beforeas u16.- The mod host rejects the island at
sim_mod.rs:269-274before the cast is stored.run_onereturns on theexecute_deterministicerror before it reads the scope buffer, so that call'sWeaveBufis dropped.apply_weave_castsruns only onOk(:383-396). The loop keeps walking sources, then entities.DEFAULT_MAX_WEAVESis 64.weaving_case_bytesstill hashesNullField. This diff does not change a replay input. The required list indeterminism-replay.ymlis the nineteen names. - Hi-Z records only when
hiz_depth_loadandsample_hizare both set.sample_hizdefaults to false. #295's closer is #388. #260's closer is #397. #269's closer is null, with a cross-reference from #389. #403, #400, #395, #371, and #372 are open.assets/cells/100_0_0.ronstill says Veilweaver in the description and the tag.open_limited_image,Texture::from_file_with_usage, and the ktx2 fallback still use uncappedstd::fs::read.
The five open threads on 10ff3630 are fixed on this head.
last_verified_commitis79122e78.git show 79122e78:docs/architecture/scripting.mdis version 1.7 and names the three-source test.49d289ebis version 1.5 (last_verified_commit: a9837f2f), section 10 still says fifteen, andgit grepfinds no such test.37b6da35only moves the stamp.- Revision 1.6 is marked withdrawn. It no longer records the agent-wide drop as verified.
- The #397 bullet says the host loop is on
49d289eb, where the trace is 1.5, and that this pull's trace is 1.7 at79122e78. The banner calls out that clause. PROJECT_STATUS.mdand the CI burndown bullet say #217 landed when the required set was fifteen, and that the required set is now the nineteen cases.- The test queues
scripts/a.rhaiat origin 0, a failingscripts/b.rhaiat 3000, thenscripts/c.rhaiat origin 2. It compares two fresh apps and expects[(1, [0, 0, 0]), (1, [2, 0, 0])]plus an error that contains bothscripts/b.rhai:andoutside the island. A source reversal, a stop on the firstErr, or a rollback of the earlierOkfails that assertion. Entity ids come from a per-world allocator, so the two error strings match.
I compiled astraweave-scripting and ran sim_mod::tests::failed_script_keeps_an_earlier_ok_for_the_same_agent. Result: 1 passed. The harness binary contains scripts/c.rhai.
One residual, not a merge blocker. The module comment says scripts run in mod-id then path order. refill_sources copies ModPrograms in place. The new paths are already a, b, c, so a later sort-by-path would still pass. Reversal and an early return would not. The test also does not assert errors.len()==1; check_case uses the same any needle.
Prior threads on the stamp, revision 1.6, the trace-version pin, the fifteen-case sentence, and the two-script test are addressed.
Sent by Cursor Automation: ASTRA PR AUDIT AGENT


Description
Rebased onto
mainat49d289eb. Head37b6da35.Status pages record #388, #394, #396, #397, #389, and #393.
A failed
run_onedrops that call's casts. An earlier script for the same agent stays applied, and a later success still lands.failed_script_keeps_an_earlier_ok_for_the_same_agentqueuesscripts/a.rhai, a failingscripts/b.rhai, thenscripts/c.rhai, and compares two runs. That test is in79122e78.docs/architecture/scripting.mdis 1.7 andlast_verified_commitis79122e78. On49d289ebthe trace is 1.5. Revision 1.6 is withdrawn wording. #217 landed when the required replay set was fifteen. The required set is now nineteen.#260 is closed and GitHub linked it to #397. #269 is closed. The fix is #389. GitHub cross-referenced that pull. The close was not attributed. #403 and #400 stay open.
Type of change
Security Considerations
No new dependencies, auth, sensitive data, or network changes. The weave-host test is in
astraweave-scripting.deny.tomland.cargo/audit.tomlare unchanged.Checklist
cargo test -p astraweave-scripting --lib failed_script_keeps_an_earlier_ok_for_the_same_agentpassedcargo test -p aw_doc_lint— 21 passedaw_doc_lint --mode warn— 634 files, 0 un-allowlistedaw_trace_sync --check— in syncCI on
37b6da35is not settled yet.