-
Notifications
You must be signed in to change notification settings - Fork 0
[codex] Add Reliability Governor runtime #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+3,361
−27
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a81165b
Add Reliability Governor runtime
Svaag 57b5f40
Address Reliability Governor review feedback
Svaag 483c4f8
Complete Reliability Governor review fixes
Svaag 8a079dd
Enforce Governor production gate alignment
Svaag cd22f18
Reconcile approved Governor issues
Svaag 2983e87
Constrain daemon runs to Governor approval scope
Svaag 2a55b0c
Reject stale Governor approvals in daemon
Svaag adcd80c
Harden Reliability Decision trust checks
Svaag e2f6c21
Hash full approved issue text
Svaag 828fcd3
Keep manual approvals independent of CDR trust
Svaag 8e79b02
Narrow approved CDR paths to issue scope
Svaag 5f87f49
Keep governor passes fair across repos
Svaag f59131d
Fail closed on stale authority payloads
Svaag 161b9e8
Include LHP hash in CDR identity
Svaag File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| version: 1 | ||
| capabilities: | ||
| - id: tier0.docs-runbooks-tests | ||
| domains: | ||
| - docs | ||
| - runbook | ||
| - tests | ||
| - dashboard | ||
| allowed_repos: | ||
| - "*" | ||
| allowed_paths: | ||
| - docs/ | ||
| - README.md | ||
| - tests/ | ||
| - .github/ | ||
| - dashboards/ | ||
| forbidden_paths: | ||
| - secrets/ | ||
| - "**/secrets/" | ||
| - .env | ||
| - .env. | ||
| target_loops: | ||
| - engineering | ||
| source_loops: | ||
| - human | ||
| - noc | ||
| - knowledge | ||
| - scheduled_miner | ||
| max_risk_tier: 0 | ||
| auto_approve_max_risk_tier: 0 | ||
| required_evidence: | ||
| - knowledge_context | ||
| - verification_method | ||
| required_checks: | ||
| - targeted_tests_or_docs_review | ||
| rollback_required: true | ||
| verification_required: true | ||
| handoff_contract: github_issue_labels | ||
| verification_owner: engineering | ||
| learning_required: false | ||
| success_count: 0 | ||
| failure_count: 0 | ||
|
|
||
| - id: tier1.monitoring-alert-tuning | ||
| domains: | ||
| - monitoring | ||
| - alert_tuning | ||
| allowed_repos: | ||
| - AS215932/network-operations | ||
| - AS215932/noc-agent | ||
| - AS215932/engineering-loop | ||
| allowed_paths: | ||
| - docs/ | ||
| - tests/ | ||
| - monitoring/ | ||
| - alerts/ | ||
| - config/ | ||
| - app/knowledge/ | ||
| forbidden_paths: | ||
| - secrets/ | ||
| - "**/secrets/" | ||
| - .env | ||
| - .env. | ||
| target_loops: | ||
| - engineering | ||
| source_loops: | ||
| - human | ||
| - noc | ||
| - knowledge | ||
| - scheduled_miner | ||
| max_risk_tier: 1 | ||
| auto_approve_max_risk_tier: 1 | ||
|
Svaag marked this conversation as resolved.
|
||
| required_evidence: | ||
| - knowledge_context | ||
| - verification_method | ||
| - rollback_plan | ||
| required_checks: | ||
| - targeted_tests_or_alert_fixture | ||
| rollback_required: true | ||
| verification_required: true | ||
| handoff_contract: github_issue_labels | ||
| verification_owner: noc | ||
| learning_required: true | ||
| success_count: 0 | ||
| failure_count: 0 | ||
|
|
||
| - id: tier2.internal-service-low-risk | ||
| domains: | ||
| - internal_service_code | ||
| - provisioning_helper | ||
| - non_prod_tooling | ||
| allowed_repos: | ||
| - AS215932/hyrule-cloud | ||
| - AS215932/hyrule-web | ||
| - AS215932/hyrule-mcp | ||
| - AS215932/noc-agent | ||
| - AS215932/engineering-loop | ||
| allowed_paths: | ||
| - docs/ | ||
| - tests/ | ||
| - hyrule_cloud/ | ||
| - hyrule_web/ | ||
| - src/ | ||
| - app/ | ||
| - scripts/ | ||
| forbidden_paths: | ||
| - secrets/ | ||
| - "**/secrets/" | ||
| - .env | ||
| - .env. | ||
| target_loops: | ||
| - engineering | ||
| source_loops: | ||
| - human | ||
| - noc | ||
| - knowledge | ||
| - scheduled_miner | ||
| max_risk_tier: 2 | ||
| auto_approve_max_risk_tier: 2 | ||
| required_evidence: | ||
| - knowledge_context | ||
| - verification_method | ||
| - rollback_plan | ||
| required_checks: | ||
| - pytest | ||
| rollback_required: true | ||
| verification_required: true | ||
| handoff_contract: github_issue_labels | ||
| verification_owner: engineering | ||
| learning_required: true | ||
| success_count: 0 | ||
| failure_count: 0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # /etc/systemd/system/hyrule-reliability-governor.service | ||
| # Deploy to: the same dedicated `loop` VM as the Engineering Loop daemon. | ||
| # | ||
| # Oneshot, timer-driven: one pass scans unlabeled / loop:intake / | ||
| # loop:candidate issues, fetches authoritative LHP-v1 payloads from NOC | ||
| # CaseService when present, loads Knowledge context, posts a Reliability | ||
| # Decision Record, and only then applies deterministic routing labels. | ||
|
|
||
| [Unit] | ||
| Description=AS215932 Reliability Governor issue-routing pass | ||
| After=network-online.target | ||
| Wants=network-online.target | ||
| # Production routing authority belongs on the dedicated loop VM, not CI. | ||
| ConditionEnvironment=!GITHUB_ACTIONS | ||
|
|
||
| [Service] | ||
| Type=oneshot | ||
| User=loop | ||
| Group=loop | ||
| WorkingDirectory=/opt/engineering-loop | ||
| EnvironmentFile=/opt/engineering-loop/.env | ||
| # .env provides the loop's GH token for `gh`, | ||
| # ENGINEERING_LOOP_NOC_LHP_BASE_URL, ENGINEERING_LOOP_NOC_LHP_SECRET, | ||
| # and optional Knowledge MCP overrides. | ||
| ExecStart=/opt/engineering-loop/.venv/bin/hyrule-engineering-loop reliability-governor --once \ | ||
| --repo AS215932/engineering-loop \ | ||
| --repo AS215932/network-operations \ | ||
| --repo AS215932/hyrule-cloud \ | ||
| --repo AS215932/hyrule-web \ | ||
| --repo AS215932/hyrule-mcp \ | ||
| --repo AS215932/noc-agent \ | ||
| --repo AS215932/hyrule-network-proxy \ | ||
| --repo AS215932/as215932.net \ | ||
|
Svaag marked this conversation as resolved.
|
||
| --registry /opt/engineering-loop/configs/loop/capability-registry.yml \ | ||
| --state-dir-path /var/lib/engineering-loop/reliability-governor \ | ||
| --knowledge-context \ | ||
| --knowledge-mcp-url http://127.0.0.1:8767/mcp \ | ||
| --knowledge-mcp-transport streamable-http | ||
| TimeoutStartSec=600 | ||
| StandardOutput=journal | ||
| StandardError=journal | ||
| SyslogIdentifier=reliability-governor | ||
|
|
||
| # Security hardening | ||
| NoNewPrivileges=yes | ||
| PrivateTmp=yes | ||
| ProtectHome=yes | ||
| ProtectKernelModules=yes | ||
| ProtectKernelTunables=yes | ||
| ProtectSystem=strict | ||
| ReadWritePaths=/opt/engineering-loop /var/lib/engineering-loop | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # /etc/systemd/system/hyrule-reliability-governor.timer | ||
| # Deploy to: the same dedicated `loop` VM as the Reliability Governor service. | ||
| # | ||
| # The Reliability Governor should run ahead of the hourly Engineering daemon so | ||
| # newly approved low-risk work is visible by the next daemon cycle. | ||
|
|
||
| [Unit] | ||
| Description=Schedule the AS215932 Reliability Governor issue-routing pass | ||
|
|
||
| [Timer] | ||
| OnCalendar=*:0/15 | ||
| RandomizedDelaySec=120 | ||
| Persistent=true | ||
| Unit=hyrule-reliability-governor.service | ||
|
|
||
| [Install] | ||
| WantedBy=timers.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.