Skip to content

Fix: enrich A5 scheduler stall diagnostics - #1705

Merged
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
vegetabledoww:codex/issue-1582-b3-stall-diagnostics
Aug 7, 2026
Merged

Fix: enrich A5 scheduler stall diagnostics#1705
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
vegetabledoww:codex/issue-1582-b3-stall-diagnostics

Conversation

@vegetabledoww

@vegetabledoww vegetabledoww commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Guard resolve_and_dispatch() against an uninitialized scheduler state.
  • Include hardware, running, and pending task tokens in A5 FIN anomaly logs to make scheduler token drift diagnosable.

Relation

Related to #1582.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The scheduler anomaly output now includes hardware and software task tokens. resolve_and_dispatch now asserts that the scheduler pointer is initialized before accessing scheduler state.

Changes

Scheduler runtime safeguards

Layer / File(s) Summary
Anomaly status diagnostics
src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_cold_path.cpp
Anomaly status output now includes cond_tok, running_tok, and pending_tok.
Dispatch initialization guard
src/a5/runtime/tensormap_and_ringbuffer/runtime/scheduler/scheduler_dispatch.cpp
resolve_and_dispatch now asserts that the scheduler pointer is non-null before continuing.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Poem

A rabbit checks the scheduler gate,
While tokens make anomaly status complete.
Hardware and tasks now leave a trace,
Null pointers stop before the race.
Hop, hop—dispatch runs with clearer state!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the primary change to improve A5 scheduler stall diagnostics.
Description check ✅ Passed The description accurately covers both scheduler-state safeguards and enhanced A5 anomaly diagnostics.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Guard the scheduler dispatch entry against an uninitialized scheduler state. Include hardware, running, and pending task tokens in FIN anomalies so token drift can be diagnosed from A5 stall logs.
@ChaoZheng109
ChaoZheng109 merged commit cda2399 into hw-native-sys:main Aug 7, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants