Skip to content

Stop repeated LHP decisions and queue starvation#41

Merged
Svaag merged 2 commits into
mainfrom
fix/lhp-v1-stable-scope-final
Jul 21, 2026
Merged

Stop repeated LHP decisions and queue starvation#41
Svaag merged 2 commits into
mainfrom
fix/lhp-v1-stable-scope-final

Conversation

@Svaag

@Svaag Svaag commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What changed

  • validate the full NOC snapshot hash and a separate immutable approval-scope hash
  • derive Reliability Decision identity from semantic approval inputs instead of mutable telemetry and rotating knowledge-pack IDs
  • recover dedupe state from trusted GitHub decision markers when local state is missing
  • classify proactive disk remediation as human-gated infrastructure work, outside the monitoring capability envelope
  • fetch and validate LHP state before posting progress callbacks
  • remove every completed/failed attempt from loop:approved, add loop:needs-human, and allow the queue to advance
  • accept CDR v1 for non-LHP compatibility while emitting CDR v2 with approval-scope identity

Why

AS215932/network-operations#458 accumulated 460 repeated bot comments. Mutable LHP case/verification state and rotating knowledge artifacts changed the Governor record identity, local-only dedupe could be lost, and a failed top queue item retained loop:approved, so subsequent cycles selected it again.

Impact

A semantic request produces at most one Governor decision even as telemetry changes. Failed or completed daemon attempts are parked for human review, so they cannot starve later approved work. Disk capacity/configuration changes remain explicitly human-gated.

Validation

  • uvx ruff check src tests
  • uv run --group dev mypy --strict src
  • full suite: 265 passed (using a policy-equivalent /var/tmp test root because host /tmp quota was exhausted)
  • focused Governor/LHP/daemon suite: 82 passed plus the isolated policy-sensitive end-to-end test

Incident: AS215932/network-operations#458

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@Svaag
Svaag marked this pull request as ready for review July 21, 2026 20:42
@Svaag

Svaag commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@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: 772b6485fb

ℹ️ 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/hyrule_engineering_loop/daemon.py
Comment thread src/hyrule_engineering_loop/daemon.py Outdated
Comment thread src/hyrule_engineering_loop/governor.py
Comment thread src/hyrule_engineering_loop/governor.py Outdated
Comment thread src/hyrule_engineering_loop/governor.py Outdated

Svaag commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a915ebca3f

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

@Svaag
Svaag merged commit c393d00 into main Jul 21, 2026
5 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.

1 participant