Repository navigation
Description
Tranche: #2504 · Agenda: #1960 · Lane: A · An act costs less of the clock · Task: A3 · Ceiling: 3 h (a limit, not a target) · Tier: expected T3; node tools/proof/tier.mjs decides · Depends on: #2527 (A2) merged or handed back
Why this tranche exists (keep it in view): The system must scale smoothly across Souls, agents and viewers, each without starving the others and without limiting anyone's experience, far enough to be confident on a front-page day or at a live event with hundreds of active agents. This task is one step toward that. If it stops serving that, hand back. Overview:
docs/architecture/scaling.md; spec: #2504.
Main purpose
Cut "the rest of the handler" (23 to 47 ms per act at 50 agents) by not building offers nobody asked for.
Problem
In explicitPlaceCapability (apps/server/src/edge/boot/world-places.ts): an act whose id is not among the Soul's listed offers runs offeredWalkObject → bindFocus({verbs:['walk']}), which builds every walk offer; strictCheck(…, caps()) evaluates caps() eagerly, which is the whole menu, for a target that is not a known place; and knownBootPlaces is rebuilt two or three times per act. Place resolution was 674 to 750 ms of the 1,530 ms "rest of handler" group at 24 agents (#2470).
Outcome
The common cases cost a lookup; the whole menu is built only on the refusal path that needs it.
Step 0: check the premise
From M2's profile at 50 agents: milliseconds per act under explicitPlaceCapability. Expected 10 to 25. Hand back if under 5.
Design (given)
In order, stopping when the acceptance is met:
- Make
capslazy instrictCheck(a function called only when a refusal needs the "did you mean" list). - Memoise
knownBootPlacesper Soul and tick. - For a not-offered walk id, resolve through the places index (
places.tsforRef) and bind that one id; keep the object-walk labels that theplace.ambiguousrefusal needs, building them only when two candidates match.
Alternatives you may choose
- Stop after steps 1 and 2 if they meet the bar: they change no result by construction.
Risks and footguns
- Step 3 can silently drop the
place.ambiguousrefusal. The oracle must include ambiguous words. - The corpus: use the place words of the existing
world-placesandnav-focus-oracletests; if none covers refusals, build it from Eden 2026's named things asnav-focus-oracle.test.tsdoes, and say so.
Acceptance
- A1 Oracle test: over the corpus (offered ids, not-offered known places, unknown words, ambiguous words) the capability or the refusal, including its code and "did you mean" list, equals the old path's.
- A2 Milliseconds per act under
explicitPlaceCapabilityat 50 agents fall by at least 60 % (M2's profile). - A3
eval-scripted --battery m4-v1: same receipts and state hashes. - A4
eval-load --souls 24,50 --act-sec 10 --profile, base against candidate, 2 repeats.
Measure
Expected: rest of handler at or under 12 ms per act at 50 agents (23 to 47 today). It does not change bind or route search.
Not in this task
god/nav.ts (#2489 owns it). The bind itself.
Touches
apps/server/src/edge/boot/world-places.ts, apps/server/src/edge/intents/strict.ts, apps/server/src/edge/ledger/ledger.ts (call sites only), tests, changes/.
Proof
T3 by path. The oracle and the runs.
Latitude and hand-back (tranche rule, the maintainer, 16 Nov)
- The main purpose above is the task. At every hour of work, and before any sub-step longer than 20 minutes, write one line in your notes: what you are doing and how it serves the main purpose. If you cannot say, stop that sub-step.
- Step 0 first, where the task has one. If the premise's number does not reproduce within a factor of two, hand back.
- You may change how: names, data shapes, test structure, an internal step, one of the listed alternatives, or your own equivalent, when the code as found shows it is better. Record it in the pull request under "Deviations from the design" with the evidence. Add your own analysis where it helps.
- You may not change what: the purpose, the acceptance bars, Touches or the ceiling. Never tune toward the expected effect; a result far from it is a finding.
- Even and uneven. Where this task compares runs, run the even arm it names and one uneven arm (the
eventshape of the shapes task, once merged; for viewers, arrivals in a wave with viewers who leave), and report both. Real load is skewed, spiky and shifting; a gain that shows only under even load is reported as that. - A smaller gain is still a result. If the measured improvement is real (outside the noise of two repeats) but below a bar, mark that box
unmet:with the numbers and finish the pull request. The coordinator weighs the gain against the complexity added and decides whether it merges (the maintainer, 16 Nov: any tangible improvement counts unless its complexity outweighs it). - Hand back at once (comment here, push what exists, end the session) when: Step 0 fails; the design does not fit the code and no alternative does; the expected effect will clearly not appear; you pass one and a half times your own estimate with acceptance not in sight; or you find the purpose itself is wrong. Say what you found, what you tried, the numbers, and one proposed rescope. A hand-back is a complete and valid outcome.
Stop rule
Say when you started in your first comment here, and state the time you took in the pull request. The ceiling is wall-clock time from your start, not counting waits on CI or review. Do exactly what the acceptance asks and nothing beside it: no extra cases, options, refactors or tests because there is time left. Stop when any of these happens: every acceptance box is ticked, marked unmet: or marked deferred:, and the pull request is ready; the ceiling is reached; the change needs more than a mechanical edit of ten lines in a file outside Touches (an "Also fixed" fix in the same area may take up to about 50), or a criterion not listed here; a declared run fails twice. Then push, comment here with what is done and the exact next step, and end the session. List every file you edited outside Touches in the pull request under "Outside Touches". Do not take another issue or re-declare a run. A defect you find on the way is fixed in this pull request and listed under "Also fixed" when the fix is small (about 30 minutes or 50 lines), stays in the same area and does not raise the tier; otherwise it gets its own small pull request, with no issue: its description is the record. File an issue only for work that will not start today, needs Gene's decision or is larger than about 2 hours. Only the coordinator changes Acceptance, Touches or the ceiling, by editing this issue.
Activity
genekogan commentedon Nov 16, 2026
Lane started 2026-11-16 09:06 UTC. Base: origin/agent/2527-walk-bind-once (A2, PR 2582, not yet merged); the PR will retarget main once A2 merges. Step 0 first.
genekogan commentedon Nov 16, 2026
Bars, declared before the runs (lane, 2026-11-16). Not re-scored after.
Runs. All on souls-timed via timed-run.yml, 2 repeats, base dispatched first and candidate straight after.
agent/2528-meter-base. That is A2's head (PR 2582, not merged yet) plus one tooling commit. The commit adds a row to the act meter: for an act's samples (act.*), the inclusive clock ms per act underexplicitPlaceCapabilityand its parts (offeredWalkObject,knownBootPlaces,strictCheck,resolvePlaceForVerb,resolveBootPlace). M2's profile has no per-function row, and A2 needs one.agent/2528-place-lookup-lazy, which is the base plus the change.--souls 24,50 --act-sec 10 --duration-sec 120 --profile --menu-stats.--battery m4-v1 --seat scripted.Step 0 (premise). From the base run, the ms per act under
explicitPlaceCapabilityat 50 Souls, mean of the 2 repeats. If it is under 5, the premise fails and I hand back. Local, one Eden 2026 boot, a far place asked by id with the gate's bind before it: 20.9 ms per call. Of that, 13.1 ms iswalkOnDemand's route search, which this task leaves alone ("the bind itself").A1.
node --test apps/server/src/edge/boot/world-places-oracle.test.ts.nav-focus-oracle.test.tsdoes.A2. The act meter's "under explicitPlaceCapability" row, ms per act at 50 Souls, mean of 2 repeats.
unmet:with the numbers.walkOnDemand's route search.A3. eval-scripted m4-v1, base against candidate. For each item,
result.jsonmust match: succeeded, why, endedBy, card outcome. Receipts named by the items must be the same receipt and phase. As in A2's lane, I read "state hashes" as each item's scored end state, because the eval prints no hash. Ids minted per run are not compared, and neither are admission retries (world.busy,soul.busy).A4. The eval-load runs above, reported with no score of their own:
act.handler-other, in ms per act;Act latency is not scored. Every act queues about 19.5 s at the world (the admission state V0 is fixing in PR 2583, not merged), so I use the act meter's own parts instead.
Uneven arm. Not run.
eval-loadhas no shape option yet (#2556's shapes cover the bench and meetup), so only the even arm runs, as in A2.test(edge): the place oracle meets cold menus, known ids that are no …
genekogan commentedon Nov 16, 2026
Lane checkpoint: waiting on runners (2026-11-16 09:40 UTC). Draft PR #2587 is at head 3cc2746, against
agent/2527-walk-bind-once. Retarget it to main once PR 2582 merges.Done:
place.ambiguousandcapability.unknownare among the answers.explicitPlaceCapabilitywent from 20.9 to 14.5 ms per call (−30 %). What remains iswalkOnDemand's route search, 13.1 ms, which is the bind and out of scope. So the A2 bar of 60 % is expected to beunmet:, as I said in the bars comment before the runs.Runs dispatched (all from the workflow at
agent/2528-meter-base):agent/2528-meter-base: 43840052046agent/2528-place-lookup-lazy: 43840059183doors-everywhere, candidate: 43840108997Exact next step: when the runs finish, score them by the bars comment:
gh run download <id> -R soulsimulation/soulsfor each run.eval-load/LOAD.md, read the "Under (Scaling A3 · Naming a place in an act does not build every walk offer or the whole menu #2528 …)" line,explicitPlaceCapabilityms per act at 50 Souls. Take the mean of r1 and r2, base against candidate. Met at ≤ 40 % of base with no overlap between repeats; otherwiseunmet:with the numbers. If the base mean is under 5, Step 0 fails: hand back.act.handler-other, builds per act, and achieved against intended acts.result.jsonper item (succeeded, why, endedBy, card outcome, named receipts).tools/proof/upload.mjs.node tools/proof/acceptance.mjs check. It is T3, so nomerge:ready.genekogan commentedon Nov 16, 2026
Scored per the bars (2026-11-16 10:15 UTC). PR #2587 is ready, at head 3cc2746, T3, labelled
ci:run. Its base is stillagent/2527-walk-bind-once, because PR 2582 has not merged. Proof: https://assets.eden.art/proofs/pr-2587/proof-2.jsonexplicitPlaceCapabilityat 50 Souls: 32.7 and 40.5 ms per act (mean 36.6).offeredWalkObjectbuilding every walk offer: 23.6 and 36.0 ms of the base's 32.7 and 40.5.doors-everywhere, a walk by place id, behaves as before.Proposed rescope. A follow-up for the design's step 3 as written: do not build every walk offer for a walk id that is not offered.
offeredWalkObjectbuilds that walk focus only to compare object labels against the asked words.god/nav.tsis Cheaper acts: the nav things list is updated per commit, not rebuilt after every edit #2489's.genekogan commentedon Nov 16, 2026
Follow-up lane (design step 3: skip building every walk offer for an asked walk id that is not offered) started 2026-11-16 10:11 UTC. Branch
agent/2528-skip-unoffered-walksfromagent/2528-place-lookup-lazy(keeps #2587's oracle and meter row). Ceiling 2 h.genekogan commentedon Nov 16, 2026
Bars for the step 3 follow-up (declared 2026-11-16, before any run; not re-scored after). Branch
agent/2528-skip-unoffered-walksat 82c6766.Measurement branches (each a normal merge of the two V0 fixes, which have not merged: PR #2583 at 5c23cdf and PR #2586 at 3a00bd8; never on the PR branch):
agent/2528-skip-m-base(bcbac14) =agent/2528-meter-base(eb00055: A2's head plus the meter row) + both fixes;agent/2528-skip-m-cand(b3b1534) = the PR branch + both fixes.Runs, on souls-timed via timed-run.yml, base then candidate dispatched back to back:
eval-load --souls 24,50 --act-sec 10 --duration-sec 120 --profile --menu-stats, repeats 2, each arm;eval-scripted --battery m4-v1 --seat scripted, repeats 1, each arm.Uneven arm: eval-load has no shape flag on timed-run's allowlist yet (#2556's shapes are not wired into it), so this is the even arm only, said as such.
node --test apps/server/src/edge/boot/world-places-oracle.test.ts, 0 differences, including asked ids that are a known place's id and a thing walk's label (offered now and not offered now).explicitPlaceCapabilityclock ms per act at 50 Souls:Reported, not gated: the same at 24 Souls, the parts under it (offeredWalkObject, resolvePlaceForVerb, resolveBootPlace, knownBootPlaces), rest of handler, builds per act, achieved and queue per act, host load and cores per process.
genekogan commentedon Nov 16, 2026
Step 3 follow-up scored per the bars (comment 6913809327), 2026-11-16. PR #2591 is ready at 82c6766 (T3, no
merge:ready). Proof: https://assets.eden.art/proofs/pr-2591/proof.jsonexplicitPlaceCapabilityat 50 Souls: base 47.9 and 34.3 ms per act (mean 41.1); candidate 52.7 and 74.3 (mean 63.5). That is +55 %, and the repeats overlap.offeredWalkObjectat 50 Souls: base 25.1 and 20.8; candidate 28.6 and 33.8.explicitPlaceCapabilitywent from 24.8 and 23.7 to 22.7 and 19.4, andofferedWalkObjectfrom 13.9 and 11.5 to 9.3 and 6.2.walkKeep) leavesofferedWalkObject's cost at 50 Souls. What remains is the fixed part of any focused walk build: the native capability read and the nav ranking of every thing. Cutting it needsofferedWalkObjectto read no walk build at all (for example, a label index of thing walks kept with the nav listing), which this design does not do.eat:eat.e_2accdf4c started,play-music:play-music.e_18fdb81d started. The only differences are admission retries.Runs: eval-load base 43848768342 and candidate 43848772778; m4-v1 base 43848777197 and candidate 43848782001. Even arm only.
genekogan commentedon Nov 16, 2026
Coordinator: A3 closed without a merge. PRs 2587 and 2591 are oracle-proven but give no gain under load. The cost sits in the fixed focused walk build (decision on PR 2591). The issue stays open until M4's profile decides whether a label-index design is worth a task.