273. How an activity is numbered, where its entry goes, and how many keys it needs¶
Written because a composer has to choose a number for an activity it is adding, and the rule this
project had recorded was a description of twelve containers with the other three treated as oddities.
Four further things a composer needs came out of checking it, which is why the heading is wider than
the question: how many keys an activity is bound by, where its base slot 9 entry may go, how the
leftover entry is told apart, and what a leave handler is allowed to be.
packages/codec/src/inventory.ts said the idle value "happens to equal second in ten of the eleven
containers and is 7 where the highest is 8 in the other", and docs/config-format.md said the same in
its own words. That was true of the eleven containers that existed when it was written and it is
false of the corpus now: three containers have the idle value inside the run, not one.
And the three were treated three different ways, which is the part worth recording. one_config
was named and called the exception. arch8_config_880 was recorded in docs/config-format.md as
corroboration for exactly this reading, "the second container to show that the idle value is
first and not the highest", which is the opposite of calling it odd. arch8_config_885 appears
nowhere at all. So the shape was not one anomaly beside a rule: it was a second rule that half the
evidence already supported and nobody had counted.
The rule, and it holds everywhere¶
The variable named CurrentActivityState takes the values 0 to its record's second. Over the
fifteen user configurations on four architectures:
| count | |
|---|---|
the values 0 to second are exactly the activities plus the idle value, with no gap and nothing spare |
15 of 15 |
second equals the activity count |
15 of 15 |
| the idle value is never itself an activity value | 15 of 15 |
| base slot 9 holds one activity entry per activity value, no duplicate and no spare | 15 of 15 |
| the idle value is the maximum | 12 of 15 |
| the idle value sits inside the run and an activity holds the maximum | 3 of 15 |
| and when it does, it is one below the maximum | 3 of 3 |
So there is one rule and not twelve cases plus three: the variable has one value per activity plus one, and exactly one of those values means idle. Where that one sits is the part that varies.
Two of those rows are one claim counted twice and the blind reviewer said so, which is worth
recording because the table reads as more independent than it is: given that second equals the
activity count, that the idle value is not an activity, and that every value lies in 0 to second,
the first row follows by arithmetic. Both were measured directly rather than derived, so the table is
honest about what was run; it is not honest about how much evidence it represents unless this
paragraph is beside it. And "the idle value" is not a second measurement either: it is the
record's own first field, read and not derived, so a table column headed idle and a column headed
first would print one number twice.
The three with the idle value inside the run are one_config, arch8_config_880 and
arch8_config_885: 0 to 6 and 8 with 7 idle; 0, 1, 2 and 4 with 3 idle; 0 to 7 and 9 with 8 idle.
All three put it in the same place, one below the maximum, and this section said only that it sat "inside the run" until Danny asked why a compiler that allocates the numbers would leave a hole at all. The three had 8, 4 and 9 non-top positions available and all three took the same one, which is not chance and which the next section should have been weighing.
What a composer does with it¶
Adding an activity raises second by one and gives the new activity the new maximum. The idle
value does not move. That is an inference and not a measurement, and it has to be said in the same
breath, because nothing here watched an activity being added: it is the cheapest rule consistent with
all fifteen, and it is what would turn a container of the twelve shape into one of the three shape.
What the corpus states is the shape of the fifteen, not the operation that produced any of them.
What a composer must not do is take second + 1 for granted as unused, or assume idle is the
highest. Both are true of twelve containers and false of three. The three are the everyday Harmony
One and two contributed arch 8 configurations, and neither configuration of the spare shows the case,
both having one activity with the idle value at the maximum. So the remote this project is allowed to
write to gives a composer no warning of it, which is the reason to state the rule rather than to test
against the bench unit.
A hypothesis about the three, which this corpus cannot decide¶
The obvious reading is that the three are configurations somebody added an activity to after the first was built, and the twelve were each generated in one pass.
The corpus supports it and does not settle it, and this section said "neither confirms nor refutes" while the supporting measurement sat one paragraph above unmade. All three put the idle value one below the maximum, out of 8, 4 and 9 places each. Adding one activity to a container whose idle value was already the maximum produces exactly that and nothing else does, so the three look like configurations that were built with one fewer activity and then had one added.
What it does not settle is the other direction. h700_config has five activities numbered 0 to 4 with
the idle value at 5, so either it was authored in one pass or Logitech's generator renumbers on a full
compile, and nothing here distinguishes those. Deciding it needs a container watched while an activity
is added, which is the instrument section 58 used for the timestamp.
The mechanism was never in doubt and is worth restating here, because the question "how does the
remote know which value is idle" has an answer that makes the hole a non-event. It does not infer it.
Base slot 13's record states each variable's starting value in first, and section 138 read the
firmware's seeder, at 0x2A266 on the Harmony One (arch 12), walking the table at boot and setting
each variable to it. So idle is not a property the format records: it is the activity counter's
ordinary initial value, which means "nothing is running" because nothing is running at boot. A
compiler therefore has no reason to prefer any particular number for it, and a reader has no reason to
work it out.
"They are strangers' working configurations" is not evidence and was fitted to the three that
suggested it. arch8_config_a to d are contributed working configurations too and all four have
the idle value at the maximum. Per architecture the split is arch 8 4 of 6, arch 12 3 of 4, arch 9 2 of
2 and arch 14 3 of 3, so provenance carries no discriminating power at all.
The rule above does not depend on the answer, which is why it is stated separately.
The other half a composer needs: position says nothing¶
An entry's position in base slot 9 does not track its activity number, so a composer may append.
The sharp number is 0 of 10: of the ten containers holding two or more activities, not one has its
entries in value order. Counting a single activity container as vacuously ascending gives 5 of 15, and
all five of those are exactly the single activity ones, so the two figures are the same result stated
at two strengths. one_config's eight entries read 2, 0, 3, 4, 6, 8, 1, 5, and
arch8_config_885's nine read 4, 9, 0, 6, 7, 2, 3, 1, 5.
The number is carried by the write in the enter list, section 120's fourth hop, and by nothing structural. So the composer's freedom here is real: append the entry after the ones that exist, per section 272's prefix rule, and the value is whatever the enter list says it is.
A composer emits two bindings on arch 14 and one everywhere else¶
This came out of checking the blind reviewer's claim that base slot 9 holds one entry per activity,
which is true and which activityBindings appears to contradict: it returns six rows for the Harmony
600's three activities. It is not a defect and the reader's own name says why, since it reports
button bindings and not entries. On the three arch 14 containers every activity is bound by two
different keys, on the same page, and on the twelve containers of the other three architectures by
exactly one.
The control is the event bits: all 63 bindings in the corpus carry a press, and so do all 26 on arch 14, so the second row of a pair is a second key rather than the same key being released. Had it been a release, a composer would need one binding and would have been wrong on nothing; as it stands, a composer that emits one binding on a Harmony 600 leaves half the menu dead.
The Harmony 600 puts up to two activities on a page, three activities over two pages, and the
Harmony 700 reference image puts five over three. Activity 2 sits on scans 9 and 34 and activity 0 on
scans 8 and 2, and the same four scans carry every activity on all three arch 14 containers. Which
physical key each of the four is, is not established here: reference/button-maps.md names those
numbers for other models and a scan code does not transfer between skins.
The count is stated twice, and adding an activity is a name tree length edit¶
The name tree states the value count as well: its node is CurrentActivityState_0_<values> and the
trailing number is second + 1. That is section 86's, not this one's, tested over 276 named
variables, and it was written up here as a new closure for an hour before the reader's own docstring
was read. Recording it that way is the point of the correction convention: the fact was already in the
repository, at twenty times the scope, and the session that "found" it had not looked.
What is new is the consequence. The count lives in the name as text, so raising it can make the
string longer, and then inserting an activity is a length edit to base slot 0 rather than a field
poke. It fires when the count crosses a power of ten, which is one_config alone in this corpus, nine
values going to ten. This paragraph said four until the test refuted it on its first
run. Rare is the argument for handling it, not for ignoring it: the machinery exists, since the device
composer already grows that section.
An activity has no node of its own, which a composer needs to know because a device does. The tree names the variable; the activity's own label is drawn on the menu page as pixels.
What a composer may put on tag 5, and two readings that die¶
Tag 5 is on all 50 activities and always runs a real list, so it cannot take the null instruction
tag 2 can. What it does was already read and this session spent an hour treating it as unknown:
ACTIVITY_START_TAG's docstring in inventory.ts says it re-sends the inputs with no power change,
measured off the sends it reaches. What fires it is still unread, and that is the open part.
The composer needs the writes rather than the sends, so those were measured. A tag 5 list's state
writes are a subset of its enter list's on 50 of 50, and the subset is empty on 24. So
composeActivity points tag 5 at the enter list when the caller says nothing, which is inside the
envelope trivially, and says in its own docstring that behavioural correctness is a separate question.
Two tighter readings were checked. "The enter list without the power writes" matches 0 of 50 and is dead. "A prefix of the enter list" was written up as dead too and is not: it holds on 28 of 50, and the wrong figure survived because the claim reached three documents and a docstring with no assertion behind it, which is step 3 of the four places skipped in the same hour it was being written about. The honest reading of 28 is that 24 of them are the empty case, so the load bearing figure is 4 of the 26 activities whose tag 5 writes anything, and those four are not scattered: the rule holds on every activity of all four arch 8 containers and on none elsewhere. Too weak to build a composer on and too strong to call refuted, which is why the number is recorded rather than a verdict.
The extra entry can be recognised from its own bytes¶
Section 272 identified base slot 9's one leftover entry by exclusion, as the selected entry no activity binding names. That is a definition and not a description, so it cannot be checked against anything. It has an independent property: it carries the enter handler and the third handler and no leave handler, tags 1 and 5 with no tag 2, on 15 of 15, where all 50 activity entries carry exactly tags 1, 2 and 5. So a reader can pick the extra entry out without knowing which entries the activities claim, and the two routes agree everywhere.
And a leave handler may be a null instruction, which a composer needs to know before it invents one: 21 of the 50 carry opcode 0 with operand 0, all 21 on arch 8 and arch 9, against 29 that run a list. So emitting tag 2 is required and giving it something to run is not.
An independent closure on the reader itself¶
activityBindings reaches an activity's number in four hops, and every count above rests on it, so a
defect in hop three or hop four would move all of them together. It was re-derived blind: the base
slot 9 index to activity value mapping recomputed from the handler set addresses, each entry's tagged
list, the action lists, and the state write opcode's own base, without touching the two later hops.
The two agree exactly on all fifteen containers, the same 50 pairs, so no activity entry is
invisible to the reader and none is reported that a direct walk does not find. The 50 is worth stating
beside the agreement, since agreement about nothing agrees too, and it is also what reconciles this
section's two populations: activityBindings returns 63 rows for 50 activities, the difference
being exactly the 13 arch 14 activities that are bound twice.
Sources checked before this was derived¶
docs/findings.md sections 120, 151 and 272, packages/codec/src/inventory.ts, and the state
variable table in docs/config-format.md. Logitech's own client was not consulted and this is a
corpus measurement rather than a firmware reading, which is the honest scope: it says what fifteen
configurations their compiler produced look like, and it does not say what their compiler would refuse.
That distinction bites on the composer rule below, which is the one part of this section that is
inference rather than measurement.
What would falsify it¶
A user configuration where the values 0 to second are not exactly the activities plus one idle
value; where second is not the activity count; or where a reader has to use an entry's position to
recover an activity's number.
Where it lands¶
docs/config-format.md, base slot 13's activity variable.docs/how-an-activity-is-built.md, which is what a composer reads.packages/codec/test/inventory.test.ts: the numbering table, the position result with its own count since that one is a licence rather than a constraint, the arch 14 binding split with its event type control, the handler shapes, and the four hop reader against a two hop walk.
Section 272 | the archive | section 274. Section 273 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.