Skip to content

board+plan: W0 is live on the 6502 — its main memory is not SpaceId::Ram - #1032

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/w0-live-on-6502
Aug 25, 2026
Merged

board+plan: W0 is live on the 6502 — its main memory is not SpaceId::Ram#1032
AdaWorldAPI merged 1 commit into
mainfrom
claude/w0-live-on-6502

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

One commit. Docs/board only — no source change, no mint, no fix. W0's verdict is unchanged; what changes is that its "there is time" half is gone.

Why this ran

W0 (#1028) measured 0 custom spaces in 94,536 rows across four x86 binaries and predicted the case "fires first on the 6502/C64 arc." That arc landed the same day — r2sleigh PRs #2#4 registered the 6502 family, wired the CLI, fetched the conformance corpus. The prediction was testable within hours, so it was tested.

MEASURED — the arch census

build_arch_spec over the real SLEIGH data, reporting the SpaceId each declared space maps to:

6502 x86-64
const Const Const
OTHER CUSTOM(0) CUSTOM(0)
unique Unique Unique
RAM RAM → CUSTOM(1) ram → Ram
register Register Register
custom count 2 1

The 6502's main memory is not SpaceId::Ram. context.rs:54-58 seeds the alias map with lowercase names only and add_space_with_endianness resolves by exact HashMap hit; the 6502 spec spells its memory RAM, misses, and falls through to Custom(1). Not a corner case — the space every load and store on that architecture touches.

Two corrections to W0's own accounting, recorded not fixed silently

  1. x86 was never zero-custom at the ARCH levelOTHER was always Custom(0). W0 counted rows, and no row in those four binaries referenced OTHER. Both numbers are correct and answer different questions; the entry says so rather than quietly replacing one with the other.
  2. There is a THIRD Custom source, missed by W0: disasm.rs:770-775 mints Custom(hash) from a wrapping byte-sum of the space name. Every anagram collides. W0 said "two stages of order-dependence, zero of identity"; the real chain is name → byte-sum hash (colliding) → Custom(n) → sorted rank → classid lo-u16 — three stages, and the first loses identity before any ordering enters.

Stated conditionally on purpose

ordinal_of(1) = 5 for the 6502, so if a varnode reaches facet::project carrying Custom(1), its classid lo-u16 is 5 where x86's same concept is 0. The "if" is load-bearing: translate_space (disasm.rs:757-765) classifies by space_type, not name, and would call that same space Ram. Two paths, two answers for one space — and that half is read from source, not observed.

The one measurement this entry does not have is named in it: lift a single 6502 memory access and read the SpaceId off the varnode. That is the difference between "the 6502 addresses wrongly" and "the 6502 addresses correctly by accident, via the path that disagrees with its own ArchSpec."

Scope

Not a lance-graph defect. The case-sensitive alias map and the divergent translation paths are r2sleigh's, upstream of everything this plan owns. Recorded here because it is the falsifier for a lance-graph verdict — the fix is not proposed and does not belong in this repo.

Test plan

  • Docs/board only; no code paths touched.
  • The census instrument (a temporary r2sleigh-lift example) was deleted after the run — both working trees verified clean.
  • Board hygiene: EPIPHANIES prepended, append-only respected; the plan's §3 ⊘ note gains the latent→live amendment in the same commit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V


Generated by Claude Code

The arch census over the real SLEIGH specs, run because W0 predicted the
6502 arc would fire first and that arc landed the same day: the 6502
declares five spaces and mints two custom ones. OTHER becomes Custom(0)
on both architectures, and the 6502's own main memory RAM becomes
Custom(1) because the alias map is seeded with lowercase names and
resolved by exact HashMap hit. Every load and store on that architecture
touches a space that is not SpaceId::Ram.

Also corrects W0's own accounting in two places. Its census counted rows
and found zero custom spaces; the arch always had one, since no row in
those four binaries referenced OTHER. Both numbers are right and answer
different questions. And W0 named two Custom sources where there are
three: disasm.rs mints Custom from a wrapping byte-sum of the space name,
so the chain loses identity to hash collisions before any ordering enters.

The address consequence is stated conditionally on purpose. Whether a
lifted 6502 varnode carries Custom(1) or Ram depends on which of two
disagreeing translation paths produced it, and that half is read from
source rather than observed. The unrun measurement that settles it is
named.

Verdict unchanged, urgency changed. The defect is upstream in r2sleigh,
recorded here because it is the falsifier for a lance-graph verdict.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cf4b7e11-5e84-4755-b8a0-e43b76107e7c


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.

❤️ Share

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

@cursor

cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_fce86952-1a21-48d9-97cc-6e7bec26958d)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review August 25, 2026 21:14
@AdaWorldAPI
AdaWorldAPI merged commit 897dee5 into main Aug 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants