Skip to content

zephyr: tighten review prompts and workflow from upstream maintainer feedback - #945

Merged
rgushchin merged 3 commits into
sashiko-dev:mainfrom
zevorn:zephyr-review-flow
Nov 25, 2026
Merged

rgushchin merged 3 commits into
sashiko-dev:mainfrom
zevorn:zephyr-review-flow

Conversation

@zevorn

@zevorn zevorn commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

I reviewed recent maintainer feedback across my upstream Zephyr PRs and updated Sashiko's Zephyr review prompts and workflow accordingly:

  • Added cmake and boards maintainer notes and expanded the existing Zephyr maintainer notes and false-positive guide (Kconfig configdefault, promptless select targets to avoid circular dependencies, concise commit messages and backport scope, board/DT conventions, non-yielding and DMA/cache pitfalls, and Ztest rigor).
  • Updated the Zephyr analysis stage instructions (goal, resources, concurrency, configuration, and security) and docs/zephyr-review.md to match.
  • Listed verification's validated findings (<validated_findings>) in Zephyr post-verification batches so the same root cause in the same function is not reported twice.

Tested locally with cargo fmt, clippy across default and minimal feature profiles, unit/integration tests, and sashiko review --project sashiko.

Add dedicated cmake and boards maintainer notes and expand the existing
Zephyr maintainer notes, core review guide, severity guide, and
false-positive guide to reflect recurring upstream Zephyr review
feedback:

- Commit and series hygiene: concise commit bodies focused on why and
  key impact rather than line-by-line diff walkthroughs, honest
  reachability framing for backport decisions, bisect-safe fix-before-
  test ordering, Apache-2.0 licensing hygiene, header layering, and
  high-signal C coding guidelines (Rules 11.8, 13.5, 20.7, and A.4/A.5).
- Kconfig and CMake conventions: configdefault versus plain config in
  Kconfig.defconfig, making select-only helpers promptless to avoid
  circular dependencies, select override semantics, minimal board
  defconfigs, DTC_OVERLAY_FILE auto-discovery suppression, include path
  boundaries, and configure-time host tool checks.
- Boards, Devicetree, and API lifecycle: board YAML supported and
  ignore_tags rules, shared .dtsi factoring, runner portability, binding
  title and include inheritance, symmetric paired property assertions,
  SemVer version updates, and draft release or migration notes.
- Embedded runtime, DMA, and test rigor: non-yielding and panic or
  coredump contexts, scheduler-lock re-entrancy, MMU-enabled hardware
  caches with CONFIG_DCACHE disabled, k_mem_phys_addr boundaries, DMA
  abort cleanup, single k_timepoint_t deadlines, K_FOREVER waiter
  wakeup, mutation-sensitive tests, and ZTEST_SHUFFLE or ZTEST_REPEAT
  isolation.
- False-positive prevention: disallow hardware bitfield claims from
  memory, recognize auto-discovered board test overlays, and reject
  unbuildable or contract-breaking suggestions.

Signed-off-by: Chao Liu <chao.liu@processmission.com>
Align the Zephyr goal, resources, concurrency, configuration, and
security stage prompts with the expanded Zephyr maintainer notes and
upstream review patterns:

- goal: enforce concise why-focused commit bodies, honest reachability
  framing for backport decisions, bisect-safe series ordering, and
  subsystem header layering.
- resources: audit oversized static RAM tables or bitmaps against
  Devicetree and Kconfig bounds, DMA abort buffer cleanup, and waiter
  wakeup on fault or teardown.
- concurrency: cover non-yielding thread contexts (k_can_yield),
  scheduler-lock re-entrancy on console or assertion paths, panic and
  coredump spinlock hazards, lock-drop snapshot refreshes, bounded ISR
  drains, and single k_timepoint_t deadlines.
- configuration: cover configdefault placement, promptless select-only
  helpers to avoid circular dependencies, select override semantics,
  minimal board defconfigs, CMake DTC_OVERLAY_FILE and configure-time
  host tool checks, and MMU cache maintenance Kconfig guards.
- security: flag flash-mount paths omitting FS_MOUNT_FLAG_NO_FORMAT
  that can destructively reformat existing user partitions on error.

Signed-off-by: Chao Liu <chao.liu@processmission.com>
Post-verification batches run after verification and see neither each
other nor the findings verification validated directly, so a batch can
confirm under a new ID a defect already reported.

List verification's validated findings with their pre-existing status
in the Zephyr post-verification prompt (flattening embedded newlines so
fields stay single-line), instruct post-verification to dismiss
candidates matching an already-validated root cause, function or
lifecycle phase, and status, and instruct verification to classify each
root cause once.

Signed-off-by: Chao Liu <chao.liu@processmission.com>
@sashiko-bot

sashiko-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown

Sashiko review

✓ No issues found across 3 commits.

Full review log on sashiko.sashiko.dev

@rgushchin
rgushchin merged commit 065af96 into sashiko-dev:main Nov 25, 2026
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