GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(id): make territory's view fit eight seats within the default fuel by dezren39 · Pull Request #248 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 17, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the bug found by #247: territory's styled view ran out of the 10M fuel limit with six or more seats (it allows eight), and a trapped view poisons the world. Stacked on #247.

  • Territory's view builds row strings and style runs and renders through a new Screen.render_rows_json, with no per-cell record list. The picture and the view JSON are byte-identical to before across six scripted states (0 to 8 seats, 0 to 14 cells per seat).
  • json_quote skips its per-byte fold when the text needs no escaping. The existing Screen API is unchanged.
  • The checked-in modules were built by an older system roc (nightly-2026-08-10), not the pinned nightly-2026-10-04 in nix/roc.nix. They are rebuilt with the pinned compiler: territory, roc-screen, roc-grid (the only examples that import Screen).

Territory view fuel

State Before (checked in) Pinned Roc, old source After
empty board 6,544,819 2,343,322 964,367
2 seats, 14 cells 7,798,938 2,572,204 1,132,099
8 seats, 14 cells trap 3,239,531 1,611,425

Full house is 16% of the limit; the target was 40%. roc-screen view 257,078 to 123,675, layout 1,192,583 to 378,384. roc-grid view 981,969 to 391,196.

Guards

  • territory_view_fits_the_default_fuel_with_every_seat_taken failed before the change with a fuel trap and now passes, asserting at most 40% of the limit.
  • A territory-full row in FUEL_BUDGETS (8 seats, 14 cells each) guards the full house with the same baseline-plus-25% rule. The territory, roc-screen, and roc-grid rows are re-baselined, for the reasons above.

Notes and open items

  • A Roc wasm-backend hazard: reusing a Str after Str.to_utf8 consumed it corrupts memory in the pinned nightly. roc test passed while the sandbox tests failed. The code rebuilds the Str from the bytes; the README records the hazard.
  • Same-source builds produced different bytes across runs, so do not compare .wasm files by hash.
  • roc-counter, tic-tac-toe, roc-chat, and lounge were not rebuilt (they do not import Screen) and may also come from the older compiler.
  • Not done: a view trap should degrade to an error screen instead of poisoning the world (F11.17).

Validation

  • cargo test --lib: 1337 passed, 6 ignored (the subagent's run). I re-ran sandbox:: (29 passed, 2 ignored) and world_compile:: (19 passed).
  • cargo fmt --check: clean. Clippy via the rustup 1.97.0 cargo exits 0; plain cargo clippy fails with E0514 as before.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
fix(id): make territory's view fit eight seats within the default fuel
7cedd7f
Territory's view cost 6.5M fuel on an empty board and 0.8M per seat, so six
or more seats trapped and poisoned the world. The checked-in module was built
by an older Roc than the pinned one; rebuilding alone saves about 4.2M. On
top of that, Screen.json_quote skips its per-byte fold for text that needs no
escaping, and the new Screen.render_rows_json / Screen.box_edge build the
screen document from whole rows without a per-cell record list. Territory's
view JSON is byte-identical to before.

Eight seats with 112 of 128 cells claimed now use 1.61M fuel (16 percent of
the limit). territory-full is added to FUEL_BUDGETS. territory, roc-screen
and roc-grid are re-baselined because their modules were rebuilt with the
pinned compiler and the cheaper Screen; rebuilt roc-screen and roc-grid are
cheaper by 52 and 60 percent on view.
@dezren39
dezren39 requested a review from a team as a code owner October 17, 2026 14:56
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a73f3ea9-0d98-47c3-beb4-02822d872693
📥 Commits

Reviewing files that changed from the base of the PR and between 8a8547b and 7cedd7f.

⛔ Files ignored due to path filters: 3
  • pkgs/id/examples/roc-grid/roc-grid.wasm is excluded by !**/*.wasm
  • pkgs/id/examples/roc-screen/roc-screen.wasm is excluded by !**/*.wasm
  • pkgs/id/examples/territory/territory.wasm is excluded by !**/*.wasm
📒 Files selected for processing: 5
  • doc/2026-10-17T16-30-00Z_fix_territory_view_fuel/2026-10-17T16-30-00Z_fix_territory_view_fuel.md
  • pkgs/id/examples/roc-world/README.md
  • pkgs/id/examples/roc-world/Screen.roc
  • pkgs/id/examples/territory/main.roc
  • pkgs/id/src/sandbox.rs
+---------------------------------------------------------+
| Nuke the bugs from orbit. It's the only way to be sure. |
+---------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned dezren39 Oct 17, 2026
Base automatically changed from platform-perf-budgets to main October 18, 2026 12:54
@dezren39
Merge main into platform-territory-fuel
6803576
@dezren39
dezren39 merged commit 9f3aee8 into main Oct 18, 2026
4 of 8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the platform-territory-fuel branch October 18, 2026 12:57
This was referenced Oct 18, 2026
Phase 11 plan is out of date: several F11 tasks have merged since it was written #312
Closed
id(world): F11.10 split world.rs, world_session.rs and cli.rs (moves only) #540
Closed
This was referenced Oct 27, 2026
id: validation — delivered Phase 11 items (claimed-done audit) #1078
Closed
mcpx: a promise and a behaviour that disagree — every declared surface needs a guard that walks it (tracker) #1893
Closed
This was referenced Nov 13, 2026
Retroactive home for PR #248: fix(id): make territory's view fit eight seats within the default fuel #9229
Closed
feat(aggregator): Phase tracker F-item mapping source of record (#9923 step 3) #10321
Merged
dashboard: Phase tracker panel (Phases 0–13 + validation #1075–#1078) for the id section (#1239 split) #9923
Closed
This was referenced Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
id(worlds): ship playable Orbit Arcade guest for orbit-arcade/edge-descent #13606
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.