Repository navigation
Land the layering-cleanup plan and promote its two open items (v1.6.1) - #45
Merged
Merged
Conversation
docs/TODO-layering-cleanup-2026-07-02.md drove LC-1 through LC-3 (shipped v1.2.4-v1.3.0: SystemSnapshot as sole frame contract, ProcessSample through L2, analytics.py taking AlertEngine/throttle/session-energy out of the widget), but it lived only on the unmerged lc-2-process-sample branch. The code shipped while its rationale stayed unpublished. Landed as the design record, with status verified against main at v1.6.0. Kept sections 1-9 verbatim so they read as the July plan (their line references point at July code, noted in the header); added section 10 for the only open scope: - 10.1 LC-4: watt/GB-s history deques and _avg_max never moved to an analytics.RollingStats. Low priority - relocates working code. - 10.2 Export parity: per-process rows, throttle/alert flags, and session energy are TUI-only and never reach --json/--serve, so profiling a local inference run through the export backends cannot answer which process drew the watts, whether the chip throttled, or the run's total energy. Records both candidate designs, the recommendation, and the per-PID Prometheus cardinality constraint. - 10.3 One acceptance criterion does not literally pass and should be reworded, not "fixed": tui/app.py imports get_soc_info for a single construction-time call. The criterion targeted per-frame L1 acquisition in the view, which is gone; beating the grep would add indirection for no layering gain. Both open items promoted into TODO-architecture-roadmap.md, which is where open work is tracked. Docs only - no code change. 95 passed (-m "not local"), ruff clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Summary
docs/TODO-layering-cleanup-2026-07-02.mddrove LC-1 → LC-3 (shipped v1.2.4–v1.3.0:SystemSnapshotas the sole frame contract,ProcessSamplethrough L2, andanalytics.pytakingAlertEngine/ throttling / session energy out of the widget) — but it lived only on the unmergedlc-2-process-samplebranch. The code shipped while its rationale stayed unpublished.This lands it as the design record, then deletes that branch.
§§1–9 are kept verbatim as the July plan, so their line references point at July code — flagged in the header rather than silently rewritten, since rewriting them would destroy the record of what was actually decided.
Status verified against
main@ v1.6.0Confirmed shipped:
MetricsUpdatedcarries exactly the snapshot (§8-3), and every internal §8-5 lists is gone fromtui/—analytics.pyholdsattribute_power,domain_throttling,bandwidth_percent,package_power_percent,AlertFrame,AlertEngine.New §10 records the only open scope:
RollingStats_avg_maxstill inHardwareDashboard.--json/--serve.§10.2 is the one that matters
export.pyemits nothing for three data points the TUI has:Monitor(interval_s, subsamples)withoutinclude_processes=True, so the list is always empty.analytics.AlertEngine, which only the dashboard widget ever drives.Someone profiling a local inference run through the export backends gets watts and utilization but cannot answer which process drew them, did the chip throttle, or what did the run cost in energy — the questions that profiling session exists to ask. Both candidate designs are recorded (opt-in export flags vs. moving
AlertEnginebehindMonitor), with a recommendation and the per-PID Prometheus cardinality constraint that keeps process data NDJSON-only either way.§10.3 — why not just fix the import
grep "from actop.utils import" actop/tui/*.pystill matches:tui/app.pyimportsget_soc_infofor one construction-time call,create_dashboard_config(args, get_soc_info()). The criterion was written to kill per-frame L1 acquisition in the view, and that is gone — nothing in the render loop touches L1. Routing a single startup call through another module to satisfy a grep would add indirection for no layering gain, so the doc says reword the criterion.Roadmap
Both open items promoted into
docs/TODO-architecture-roadmap.md, which is where that file says open work is tracked (it explicitly excludes completed work).Validation
Docs only — no code change.
🤖 Generated with Claude Code