Skip to content

Navigation Menu

Sign in
Sign up

Allow a stand-local alarm configuration - #129

Draft
test1card wants to merge 2 commits into
master from
codex/alarms-local-replacement
Draft

Allow a stand-local alarm configuration #129
test1card wants to merge 2 commits into
master from
codex/alarms-local-replacement

Conversation

@test1card

@test1card test1card commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Laboratory deployment failure corrected

config/*.local.yaml is the stand-specific authority pattern, but alarms_v3.yaml was loaded directly and had no local replacement. A laboratory with a different sensor roster therefore had to edit the tracked alarm file merely to boot, carrying permanent merge conflicts in a safety-relevant configuration.

When config/alarms_v3.local.yaml exists, this change selects it as a whole-file replacement. Otherwise the tracked base remains authoritative. The selected file is used consistently for alarm parsing, protected-pattern extraction, and complete alarm-reference liveness validation.

The local file is not a bypass:

  • malformed YAML fails before the persistence writer is created;
  • a dangling channel reference fails the existing startup liveness gate;
  • a dangling symlink is treated as a selected but unreadable local authority and fails closed;
  • no stand-specific channel list is committed here.

Evidence

On exact master, the four new startup controls failed: the tracked file was chosen instead of the local replacement, and malformed alarm files reached persistence without shape validation.

With this change:

  • Windows affected suites: 160 passed;
  • Ubuntu 22.04 affected suites: 160 passed;
  • read-only Ruff lint and format checks passed;
  • git diff --check passed.

The open pull-request queue was checked by changed file. Several older pull requests also touch engine.py, but none implements stand-local whole-file alarm authority; this is file contention, not a duplicate subject.

This pull request remains a draft until the exact-head Codex review has no findings. Full hosted CI is intentionally deferred until then.

Copy link
Copy Markdown
Owner Author

@codex review

Please review the exact head ea9d76e. Focus on whether the stand-local whole-file replacement is selected consistently for parsing, protected-pattern extraction, and liveness validation; whether malformed or dangling local authorities fail before persistence; and whether the fallback remains the tracked file only when the local path is lexically absent.

chatgpt-codex-connector Bot commented Aug 31, 2026
edited
Loading

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026年08月31日T17:36:06.740401Z ea9d76e Manual request
i️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea9d76e351

i️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cryodaq/engine.py
Comment on lines +7135 to 7136
_alarm_v2_engine_cfg, _alarm_v2_configs = load_alarm_config(alarms_v3_path)
v3_patterns = load_critical_channels_from_alarms_v3(alarms_v3_path)

@chatgpt-codex-connector chatgpt-codex-connector Bot Aug 31, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Snapshot the selected alarm authority once

When config/alarms_v3.local.yaml is replaced while startup is in progress (for example, by an editor's atomic save), these calls read it independently: the evaluator retains the generation parsed on line 7135, protected-pattern extraction may consume a newer generation on line 7136, and liveness reads the path a third time. A dangling reference present only in the parsed generation can therefore disappear before validation, or a CRITICAL channel can be omitted from the throttle protections while still being evaluated at runtime. Read the selected bytes once and derive all three products from that immutable snapshot, as this function already does for interlocks_snapshot.

AGENTS.md reference: AGENTS.md:L20-L22

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /