Conversation
…sim-time observer D72 kept the engine metrics push gate, the API-server refresh loop and _last_refresh on the real clock, allowlisted, and corrected doc 01 D5 to match. All three now run on virtual time: the push gate and the refresh loop are virtual timers, and metrics.py:408 joins the clock-read substitution list. A periodic observer in the traffic LP scrapes /metrics every scrape_interval of simulated time over the existing HTTP channels; the run ends with its workload (end_workload), so the timers cannot keep it alive. The "corrects 01 D5" passage is deleted. D74 keeps per-step sampling and states that it coexists with the scrape series. D74's transport wording, the class-T row, the decision log and the README index row for doc 11 are aligned. Part of #443. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 28, 2026
Owner
Author
|
Follow-up commit pushed, |
This was referenced Sep 28, 2026
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #443. Design-doc only.
Moves D72 and D74 of
11onto the PDES time model: the three metrics clocks run on virtual time, and a sim-time observer scrapes/metrics.What changes
EngineCore.busy_loop,DPEngineCoreProc.busy_loop), the refresh loop'sasyncio.sleep(_metrics_refresh_loopinapi_server.py) and_last_refresh(AtomMetricsExporter.update) run on virtual time; none is allowlisted./metricseveryscrape_intervalof simulated time over the existingtraffic->frontend:http/frontend->traffic:streamchannels. No new LP or channel; samples carry virtual timestamps.end_workload()(CAEND) after its last scrape, so a periodic observer cannot keep a run alive.01D5" is replaced by a note that the virtual push cadence there stands. Per-step sampling is unchanged and coexists with the scrape series.Dev record
_last_refreshis also exported as the gaugeatom:metrics_last_refresh_timestamp_seconds, mentioned by neither the old decision nor the design; it now carries virtual time.CompassEventLoophas no section at the tip yet.scrape_intervalconfig key.README.mdand01, owned by compass(design): doc 01 D1-D3.5 protocol to HLA-style PDES grants #446 and compass(design): doc 01 D4, D5, D9 and the decision log move to the PDES mechanisms #450 (details).Named result
none.
Gates
none: no code.
Details
How and why the clocks move (D72). The push gate is a virtual timer whose next push is a local next event folded into the engine's NER time. The refresh loop's
asyncio.sleepbecomes virtual with no code change because the API server's loop runs on virtual time._last_refreshjoins the clock-read substitution list (D9 item 2 of01). The old reasons for real clocks do not hold: at 100x, a push every 5 virtual seconds is one small message per 50 ms of wall time, which affects simulator speed, not the prediction; a wall-clock staleness problem exists only for someone watching the simulator on the wall clock.D74: the per-step series is the ground truth for analysis; the scrape series is comparable with a real run's Prometheus at the same interval. The transport wording and dataflow diagram no longer say "wall timer" or "wall scrape".
Alignment: the D77 class-T row says
_last_refreshis virtual. The decision-log rows for D72 and D74 are rewritten and markedrevised 2026-09-28. The doc-11 row of thedesign/README.mdindex no longer says "Both metrics clock reads stay real". The follow-up commit: the emission-cost row of the backfill table said a hook inside "a Category-A path" would be invisible; #450 maps old category A to K1 (event cost,advance_to), the only path along which virtual time advances by a modelled duration, and the row now names that path.Left to other PRs:
design/README.md, Scope table, "Wall-clock time" row: "Failure detectors and metrics-push cadence deliberately stay real.01D5,11D72". The metrics half is now false; the row is shared with D5 of01, whose failure-detector half compass(design): doc 01 D4, D5, D9 and the decision log move to the PDES mechanisms #450 also changes, so it is left for compass(design): doc 01 D4, D5, D9 and the decision log move to the PDES mechanisms #450 or the lead.01restates the old D72 in D1.2 (the allowlist "is the set doc11D72 establishes as deliberately real") and in the D3.4 row "Deliberately-real clock reads ...11D72", both compass(design): doc 01 D1-D3.5 protocol to HLA-style PDES grants #446's sections and absent from its worklist (v0.20 design section 10.1); and in the D5 strikethrough "corrected by11D72", expected in compass(design): doc 01 D4, D5, D9 and the decision log move to the PDES mechanisms #450's worklist.api_server.pyfor_metrics_refresh_loopthat has drifted slightly at the tip; outside the worklist, left unchanged.CompassEventLoop(section 4.12) in D1 of01and in06; neither has it at the tip. The scrape-series gap is design section 4.14.01(virtual metrics cadence, control-command refusals), the decision log and doc 01's README row (compass(design): doc 01 D4, D5, D9 and the decision log move to the PDES mechanisms #450); D3 (the end-of-workload invariant) and D1 (the asyncio deployment note) of01(compass(design): doc 01 D1-D3.5 protocol to HLA-style PDES grants #446); the observer's harness side, the aiperf adapter's periodic scrape (compass(design): doc 06 on the PDES time model: tokenizer stations, tracestate and SSE-comment carriers, simulated-time scrape #447).Register: none opened or closed; T40-T46 unaffected; the
12_open_items.mdline "the clock-read sites of11D72" stays true.Generated with Claude Code