Skip to content

Re-run the papercuts against Ghost HEAD, and record what was fixed - #4

Merged
kaidesu merged 1 commit into
mainfrom
claude/ghost-items-prioritize-f4ghko
Sep 4, 2026
Merged

kaidesu merged 1 commit into
mainfrom
claude/ghost-items-prioritize-f4ghko

Conversation

@kaidesu

@kaidesu kaidesu commented Sep 4, 2026

Copy link
Copy Markdown
Member

Overview

docs/papercuts.md opens by saying every behaviour in it was executed against a build of the interpreter rather than inferred from SPEC.md. That is the document's whole value, and it decays — Ghost has since fixed some of these. So every Ghost item was re-executed against a build at ghost c31c79d.

Three no longer reproduce, along with the list.length hazard:

Item State
A function cannot assign to a variable outside itself fixed — Ghost §13.13
Closures cannot capture a loop variable fixed — Ghost §13.14
Blocks do not introduce a scope fixed — Ghost §13.15
list.length hands back the function fixed — now a proper property error

They are marked fixed and kept, not deleted — the architecture here is shaped around them, and the record of why is worth more than a current list. Everything else still reproduces exactly as written, and/or short-circuiting included.

Changes

Added

  • A status banner on the Ghost section: what was re-run, against which commit, and the caveat that the three fixes landed after 1.0.0-beta.3, so code running against a released Ghost still needs the workarounds this repository is built around.
  • Each remaining item now carries the SPEC.md section Ghost tracks it under and the priority Ghost assigned it, so this document and Ghost's new §15 read against each other.

Changed

  • The three fixed items get a **Fixed.** note explaining what Ghost did, so their bodies are no longer left in the present tense contradicting the heading.
  • CLAUDE.md keeps the three fixed rules and marks them, rather than dropping them — they still hold against a released Ghost, and writing code that works under both costs nothing. State on instances and make… factories are correct either way. There is a note to drop them once this repository requires a Ghost carrying the fixes.

Additional context

Block scoping was the one worth checking rather than assuming. This document names Dock.arrange() as depending on the old behaviour, and Ghost documents the change as the one breaking change in that batch. It turns out to be unaffected: arrange() binds area and taken before the switch, so the [taken, area] = ... inside each case rebinds them through the walking assignment that landed in the same change, rather than declaring case-local names. Ghost paired the two deliberately, and this is what that pairing buys.

ghost test.gs — 132 passed, 0 failed — against that build.

What would not survive is a name whose first assignment is inside a branch (if (c) { result = 1 } then reading result), which this codebase does not do anywhere.

Companion PR: ghost-language/ghost#177 records the four items this report raised that Ghost's SPEC.md had no entry for, and ranks the open ones.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EGsNMRiKwWmvoizxD619zA


Generated by Claude Code

Every Ghost item in docs/papercuts.md re-executed against a build of the
interpreter at ghost c31c79d, since the document's whole value is that it
reports what the interpreter does rather than what SPEC.md says.

Three no longer reproduce - outward assignment, loop-variable capture and
block scoping, fixed upstream as one decision - along with the
`list.length` hazard. They are marked fixed and kept, not deleted, since
the architecture here is shaped around them and the record of why matters
more than the current list.

Block scoping was the one worth checking rather than assuming: this
document names `Dock.arrange()` as depending on the old behaviour, and
Ghost documents the change as breaking. It is unaffected - `arrange()`
binds `area` and `taken` before the `switch`, so the destructuring inside
each case rebinds them through the walking assignment that landed in the
same change. The full 132-case suite passes against that build.

The remaining items now carry the SPEC section Ghost tracks each one
under and the priority it was given there, so this document and Ghost's
§15 stay readable against each other.

CLAUDE.md keeps the three fixed rules, marked, because they still hold
against a released Ghost (the fixes are post-1.0.0-beta.3) and writing
code that works under both costs nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EGsNMRiKwWmvoizxD619zA
@kaidesu
kaidesu marked this pull request as ready for review September 4, 2026 06:13
@kaidesu
kaidesu merged commit c8762f9 into main Sep 4, 2026
2 checks passed
@kaidesu
kaidesu deleted the claude/ghost-items-prioritize-f4ghko branch September 4, 2026 06:13
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