Skip to content

feat(claimant): record where each fire's mode came from (#10332) - #11794

Merged
dezren39 merged 1 commit into
mainfrom
fix/claimant-mode-provenance
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/claimant-mode-provenance

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Refs #10332 (item 2; item 3, managed config, needs a design choice and stays open)

Before: when the claimant's mode file vanished, fires.jsonl showed only "mode": "shadow". Nothing in the log said the file was missing rather than set to shadow, or when it went, so the 2026-11-14 deletion could not be dated or attributed after the fact.

After: every fires.jsonl entry carries mode_source with the mode file's path, its state (ok, missing, unreadable or invalid), the file's mtime and the state directory's mtime, and the startup line names the same. A deletion changes the directory mtime, so a missing read bounds when the file went.

How: read_mode() fills a module-level _mode_source on every read (the same pattern as _fire_candidates), log_fire() writes it, and the MISSING warning now also prints the directory mtime. Two tests cover the states and the log entry. The README's fire-log example documents the field. Ran test_poll.py (95), test_claimant.py (44), test/test_claimant.py (10) and the launch, handoff and batch suites: all OK.


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

read_mode() now records the mode file's path, whether it read ok,
missing, unreadable or invalid, the file mtime and the state directory
mtime. log_fire() writes it into every fires.jsonl entry as mode_source,
and the startup line names it, so a live-to-shadow flip can be dated
from the log alone. Item 3 of #10332 (managed config) is left open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 marked this pull request as ready for review November 18, 2026 11:49
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 11:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T11:50:33.721819Z 1680318 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit 21132cb into main Nov 18, 2026
@dezren39
dezren39 deleted the fix/claimant-mode-provenance branch November 18, 2026 11:49
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b4d5393e-de27-4ab5-b10d-3bd7d8b502f7
Commits

Reviewing files that changed from the base of the PR and between 85f9f38 and 1680318.

Files selected for processing: 3

  • pm-stack/opencode-claimant/README.md
  • pm-stack/opencode-claimant/claimant.py
  • pm-stack/opencode-claimant/test/test_claimant.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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