Skip to content

176. Key lookup walks a stack, and two placement readings become meaning

Reported from outside and tested here. trelowney sent this by email on 26 August 2026, out of his own reading of the Harmony 525's firmware. Under decision 7 an upstream finding is a hypothesis rather than a fact, so what follows separates what he read from what this corpus can check, and says which is which. The firmware reading is his and has not been repeated here; the counts are ours.

What this project already had, and the shape of the gap. packages/codec/src/actions.ts carries all three of the relevant operations in the 0x1F band, where the high operand byte names the operation and the low byte is its argument. One of them had a meaning and two had only a place:

high byte reading depth
0xFF select the current binding table entry, base slot 9 meaning, section 39
0xFE add the low byte to a set the interpreter keeps placement, section 73
0xFD remove the low byte from that set placement, section 73

Those two were part of the placement-only remainder that readingCoverage counts as reaching a known routine with no known consequence for a config, and moving them is what took that remainder from 1.6% to 1.4% of the corpus. Section 73 read the routine and stopped, which is what a placement reading is.

His reading. Key lookup does not consult one table. It walks a stack of binding lists held in RAM, top down, first match winning, and the low byte of 0xFE and 0xFD is an index into base slot 9's pointer array. So 0xFE pushes a list and 0xFD removes one, and two reserved values on the stack mean "search whatever list this variable names" rather than a fixed index. The same key press therefore means different things depending on a stack the config builds and unwinds as the user moves between menus.

The word this corrects is ours, and it is the one that matters. docs/config-format.md said base slot 9 holds sets of button bindings, and actions.ts said "a set the interpreter keeps". A set has no order, and "top down, first match wins" is meaningless without order: ordering is the entire mechanism, because it is what lets one list override another rather than merely coexist with it. So the old wording was not vague, it was wrong in the single respect that carries the behaviour.

It also explains something the spec recorded and never accounted for. Base slot 9's entries each carry an enter and a leave handler, section 67, described structurally with no reading of what they are for. Push and pop.

What the corpus says, which is the half that is ours

Counting 0x1F instructions by high operand byte over all 15 user configs:

architecture 0xFE, push 0xFD, remove
arch 9, Harmony 525 5 0
arch 14, Harmony 600 and 700 5 0
arch 8, Harmony 880 and 885 13 8
arch 12, Harmony One 14 9

159 pushes and 84 removes in total. Two things in that table are evidence rather than description.

The counts are constant within an architecture whatever the config holds. All four arch 8 configs give 13 and 8 whether they drive three devices or seven. Both Harmony One configs give 14 and 9, at five devices and at one. So these instructions are fixed scaffolding the generator always emits, which is what menu navigation should look like and is not what device data looks like. The contrast inside the same band is the control: 0xFF, the one operation that was already read as selecting an entry, swings from 3 to 180 across the same configs, exactly as a content-dependent operation should.

Arch 9 gives five pushes and no removes, and that number was predicted from a different config. His own 525 sample builds its stack with five pushes in a row, which he described before seeing ours. Two configs, two remotes, one architecture, same count.

Arch 9 and arch 14 never remove. Both build a stack and never unwind it, so on those two models the lookup order is fixed once at startup and the override behaviour only actually varies on arch 8 and arch 12. That is a prediction worth recording because it is falsifiable by any arch 9 or arch 14 config that emits a single 0xFD.

What is not established

The corpus cannot tell a push from an unordered insert, because a count is a count under either reading. The ordering, the top-down walk and the first-match rule all rest on his firmware reading, which is why they are attributed rather than asserted. What the counts establish is that the two instructions are structural navigation machinery rather than content, and that whatever they maintain has a fixed size per architecture.

The reserved values are not checked here at all. He reports two of them, meaning "search whatever list this variable names". Nothing in this section tests that, and the corpus figures above do not depend on it.

Section 39's own reading is untouched. 0xFF selecting a base slot 9 entry, and the four hop chain of section 120 that reaches an activity through it, are unaffected: they describe which entry is named, and this section describes the structure the name goes into. If anything the two fit better than before, since "select the current entry" and "push an entry onto a lookup stack" want the same argument.


Section 175 | the archive | section 177. Section 176 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.