akgl_Character::speedtime is loaded from JSON and read by nothing #47

Open
opened 2026-08-02 18:33:33 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md, "Found while writing the manual" -> "Defects with no prior entry", item 12 (at bbb7b8f)

speedtime is loaded from character JSON (src/character.c:263), written through
(int *)&obj->speedtime on a uint64_t field -- correct only because the struct
was zeroed and the host is little-endian -- and then read by nothing.

Frame timing comes from sprite->speed.

Three things to settle together:

  1. Whether the field goes (ABI break) or gains a reader.
  2. The (int *) cast, which is exactly the class of redundant-looking cast that
    the cast sweep is meant to interrogate -- this one is load-bearing and wrong.
  3. include/akgl/character.h:139 still documents speedtime "in seconds"; the
    field is nanoseconds, scaled from milliseconds at src/character.c:264.

Files: src/character.c:263-264, include/akgl/character.h:30,139


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md, "Found while writing the manual" -> "Defects with no prior entry", item 12 (at bbb7b8f) `speedtime` is loaded from character JSON (`src/character.c:263`), written through `(int *)&obj->speedtime` on a `uint64_t` field -- correct only because the struct was zeroed and the host is little-endian -- and then **read by nothing.** Frame timing comes from `sprite->speed`. Three things to settle together: 1. Whether the field goes (ABI break) or gains a reader. 2. The `(int *)` cast, which is exactly the class of redundant-looking cast that the cast sweep is meant to interrogate -- this one is load-bearing and wrong. 3. `include/akgl/character.h:139` still documents `speedtime` "in seconds"; the field is nanoseconds, scaled from milliseconds at `src/character.c:264`. **Files:** `src/character.c:263-264`, `include/akgl/character.h:30,139` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.10.0 milestone 2026-08-02 18:33:33 -04:00
tachikoma added the hygieneblast-radius:low labels 2026-08-02 18:33:33 -04:00
tachikoma added the status::grooming label 2026-08-02 18:49:22 -04:00
Sign in to join this conversation.