Skip to content

refactor(cli): remove foreground resource policy - #718

Merged
Sinity merged 3 commits into
masterfrom
feature/refactor/remove-cli-resource-policy
May 2, 2026
Merged

Sinity merged 3 commits into
masterfrom
feature/refactor/remove-cli-resource-policy

Conversation

@Sinity

@Sinity Sinity commented May 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Removes the Polylogue CLI resource-policy layer and keeps workstation resource policy in the host/daemon boundary. The branch also includes the existing local reparse write-amplification fix so metadata-only reparses do not cascade through DELETE+INSERT behavior.

Problem

The 2026-05-02 workstation pressure incident showed that polylogue run --reparse ... could become an opaque, heavy foreground workload. The first resource-boundary fix made that a Polylogue CLI concern via --resource-mode, transient systemd scopes, nice/ionice demotion, and an off escape hatch. That was the wrong ownership boundary: Polylogue is portable product code, while Sinnix and future polylogued supervision should own concrete workstation scheduling/storage policy.

The same incident also exposed unnecessary write amplification during same-hash reparse writes: metadata-only updates could still travel through a heavier replacement path instead of updating the changed fields in place.

Solution

  • Remove --resource-mode from polylogue run and polylogue doctor.
  • Delete the CLI-side resource helper that launched systemd scopes or applied process-local demotion.
  • Stop emitting resource_mode/resource_boundary fields from doctor output.
  • Update CLI snapshots, generated docs, topology/proof docs, and tests for the smaller CLI surface.
  • Keep the reparse ingest fix that avoids DELETE+INSERT cascades for same-hash metadata updates.
  • Record the corrected design direction on fix(cli): isolate resource-heavy maintenance commands #708/Add xtask-like execution history for Polylogue dev and operator workflows #716: Polylogue should expose workload facts and execution history; Sinnix/polylogued should own host policy.

Verification

  • .venv/bin/python -m pytest -q tests/unit/pipeline/test_ingest_batch.py tests/unit/pipeline/test_parsing_service.py tests/unit/cli/test_run_command_runtime.py tests/unit/cli/test_check_support_runtime.py tests/unit/cli/test_check_rendering_plain_runtime.py tests/unit/cli/test_check.py tests/unit/cli/test_terminal_snapshots.py -> 135 passed.
  • .venv/bin/python -m pytest -q tests/unit/cli/test_run_command_runtime.py tests/unit/cli/test_check_support_runtime.py tests/unit/cli/test_check_rendering_plain_runtime.py tests/unit/cli/test_check.py tests/unit/cli/test_terminal_snapshots.py -> 93 passed before the ingest-helper mypy cleanup.
  • .venv/bin/ruff check on changed Python files -> all checks passed.
  • direnv exec /realm/project/polylogue .venv/bin/mypy tests/unit/pipeline/test_ingest_batch.py -> success.
  • git diff --check -> clean.
  • Pre-push devtools verify --quick under direnv exec /realm/project/polylogue -> all checks passed: ruff, mypy, render-all, topology, layering, file budgets, test ownership, schema roundtrip, cross-cuts, suppressions, manifests, witness lifecycle, proof-pack.

Refs #708.
Refs #716.

Summary by CodeRabbit

Release Notes

  • Removed Features

    • Removed --resource-mode option from polylogue run and polylogue doctor commands. Resource policy management is now handled by the host environment.
  • New Features

    • Added support for POLYLOGUE_FORCE_WRITE environment variable to control forced-write behavior.
  • Changes

    • Updated conversation data handling to properly detect changes in sort keys.
    • GitHub Actions workflows now require manual triggering via workflow dispatch.

Sinity and others added 2 commits May 2, 2026 19:05
When --reparse is used to fix derived metadata (e.g. sort_key after a
timestamp parsing fix), the write path was doing a full DELETE-all +
INSERT-all cycle for content_blocks, action_events, and attachments
even though content had not changed. On a 23GB database this made
reparsing impractically slow (~60s per large conversation).

With this change, force_write (signaled via POLYLOGUE_FORCE_WRITE=1
from the CLI --reparse path) only forces conversation and message
upserts. Content blocks, action events, and attachments are only
replaced when the content hash actually differs.

Also added sort_key to the conversation upsert WHERE clause so
sort_key-only changes trigger an UPDATE (matching the existing
message upsert behavior).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Problem: Polylogue CLI had grown a host-policy resource boundary with a public --resource-mode flag, systemd transient-scope launch, nice/ionice demotion, and an explicit off escape hatch. That makes workstation scheduling policy a product concern and lets heavy runs bypass Sinnix supervision.

What changed: remove the resource-mode options from run and doctor, delete the maintenance resource helper, stop emitting resource boundary data in doctor output, and update docs/snapshots/tests. Heavy local policy now belongs in Sinnix services/wrappers or future polylogued-managed execution, while Polylogue keeps product behavior portable.

Verification: .venv/bin/python -m pytest -q tests/unit/cli/test_run_command_runtime.py tests/unit/cli/test_check_support_runtime.py tests/unit/cli/test_check_rendering_plain_runtime.py tests/unit/cli/test_check.py tests/unit/cli/test_terminal_snapshots.py; .venv/bin/ruff check changed Python files; git diff --check.
@coderabbitai

coderabbitai Bot commented May 2, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 755cde25-be3e-41b2-ac86-fb9d277e0169

📥 Commits

Reviewing files that changed from the base of the PR and between 9029a37 and 37675ef.

📒 Files selected for processing (31)
  • .github/workflows/actionlint.yml
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/dep-audit.yml
  • .github/workflows/nix.yml
  • .github/workflows/pr-policy.yml
  • .github/workflows/proof-comment.yml
  • CHANGELOG.md
  • docs/cli-reference.md
  • docs/configuration.md
  • docs/plans/topology-target.yaml
  • docs/topology-status.md
  • docs/verification-catalog.md
  • polylogue/cli/commands/check.py
  • polylogue/cli/commands/run.py
  • polylogue/cli/shared/check_models.py
  • polylogue/cli/shared/check_options.py
  • polylogue/cli/shared/check_rendering_json.py
  • polylogue/cli/shared/check_rendering_plain.py
  • polylogue/cli/shared/check_workflow.py
  • polylogue/maintenance/resources.py
  • polylogue/pipeline/run_execution.py
  • polylogue/pipeline/services/ingest_batch.py
  • tests/unit/cli/__snapshots__/test_terminal_snapshots.ambr
  • tests/unit/cli/test_check.py
  • tests/unit/cli/test_check_rendering_plain_runtime.py
  • tests/unit/cli/test_check_support_runtime.py
  • tests/unit/cli/test_run_command_runtime.py
  • tests/unit/maintenance/test_resources.py
  • tests/unit/pipeline/test_ingest_batch.py
  • tests/unit/pipeline/test_parsing_service.py

📝 Walkthrough

Walkthrough

Resource isolation functionality is removed from the Polylogue CLI—the --resource-mode option, polylogue/maintenance/resources.py module, and all related command wiring/output are deleted. GitHub workflow automation is disabled, triggering only via manual workflow_dispatch. Pipeline force-write and conversation sort-key handling are updated incrementally.

Changes

Resource Isolation Mode Removal

Layer / File(s) Summary
Data Shape
polylogue/cli/shared/check_models.py
CheckCommandResult removes resource_boundary: ResourceBoundaryReport | None field.
Module Deletion
polylogue/maintenance/resources.py
Entire 276-line module defining ResourceMode, ResourceBoundaryRequest, ResourceBoundaryReport, apply_resource_boundary(), doctor_resource_request(), pipeline_resource_request(), and related systemd/process-demotion logic is removed.
CLI Option Removal
polylogue/cli/commands/check.py, polylogue/cli/commands/run.py
--resource-mode Click option and parameter wiring removed from both doctor and run commands; CheckCommandOptions struct no longer holds resource_mode field.
Option Decorators
polylogue/cli/shared/check_options.py
CHECK_COMMAND_OPTION_DECORATORS tuple removes the --resource-mode [auto|scope|process|off] option decorator.
Workflow & Output
polylogue/cli/shared/check_workflow.py, polylogue/cli/shared/check_rendering_*.py
Maintenance workflow stops computing/assigning result.resource_boundary via apply_resource_boundary(). Rendering helpers remove "Resource mode: …" console output and resource_mode from JSON maintenance payload.
Documentation
docs/cli-reference.md, docs/configuration.md, CHANGELOG.md
CLI reference removes --resource-mode from run/doctor command docs. Configuration docs replace resource isolation guidance with note that policy belongs in host environment. Changelog documents removal.
Generated Manifests
docs/plans/topology-target.yaml, docs/topology-status.md
Topology target manifest removes polylogue/maintenance/resources.py entry. Stable module count decrements (586→585).
Tests & Snapshots
tests/unit/maintenance/test_resources.py, tests/unit/cli/test_check.py, tests/unit/cli/test_check_rendering_plain_runtime.py, tests/unit/cli/test_check_support_runtime.py, tests/unit/cli/test_run_command_runtime.py, tests/unit/cli/__snapshots__/test_terminal_snapshots.ambr
Entire test_resources.py file (106 lines, 6 test functions) deleted. Remaining tests remove resource_mode/resource_boundary parameters, assertions, and help-text snapshots; JSON maintenance assertions change from checking resource_mode.effective_mode to asserting "resource_boundary" is absent.
Pipeline Incremental Changes
polylogue/pipeline/run_execution.py, polylogue/pipeline/services/ingest_batch.py, tests/unit/pipeline/test_ingest_batch.py, tests/unit/pipeline/test_parsing_service.py
run_sources sets POLYLOGUE_FORCE_WRITE="1" environment variable when force_write=True. Conversation upsert SQL adds sort_key to conflict-detection logic. Force-write test replaced with sort-key update scenario. parse_from_raw calls annotated with force_write=False in parsing-service tests.

GitHub Workflows Configuration

Layer / File(s) Summary
Workflow Triggers
.github/workflows/actionlint.yml, .github/workflows/ci.yml, .github/workflows/codeql.yml, .github/workflows/dep-audit.yml, .github/workflows/nix.yml
All five workflows updated to trigger only via workflow_dispatch (manual). Removed automatic triggers: push (to master), pull_request (from master), and scheduled cron runs.
Workflow Jobs
.github/workflows/pr-policy.yml, .github/workflows/proof-comment.yml
PR policy enforcement job and proof-pack job replaced with single disabled job that echoes "disabled during May 2026 CI outage." Workflow trigger changed to workflow_dispatch only.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

  • fix(cli): isolate resource-heavy maintenance commands #708: Resource isolation and CLI self-demotion removal are the exact inversions described in this issue; this PR implements the complete reversal of product-side --resource-mode functionality and delegates resource policy to the host environment.

Possibly related PRs

Suggested labels

type:refactor, area:cli, area:maintenance, area:pipeline, type:test

🐰 The burrow grows lean and tidy,
Resource modes bid their goodbye,
Workflows wait for the manual call—
The rabbit declutters them all! 🌱

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/remove-cli-resource-policy

Tip

💬 Introducing [Slack Agent](https://www.coderabbit.ai/agent): Turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get your free trial and get 200 agent minutes per Slack user (a $50 value).


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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

Polylogue Proof Pack

Refs: origin/master..HEAD
Changed paths: 24

Affected Domains

  • architecture_discipline — 2 claim(s), maturity growing
  • spec_completeness — 1 claim(s), maturity seed
  • unclassified — 4 claim(s), maturity seed
Additional routed domains with zero affected claims
  • docs_media — maturity seed

Focused Gates

  • devtools render-all --check — generated surface or renderer changed
  • devtools verify-manifests — structural manifest changed
  • devtools affected-obligations --path docs/plans/topology-target.yaml — refresh structural obligation routing
  • devtools verify-topology — topology projection changed
  • devtools affected-obligations --path docs/topology-status.md — refresh structural obligation routing
  • pytest tests/unit/cli — CLI command surface changed
  • pytest tests/unit/proof/test_evidence_runners.py — CLI proof runners exercise command output
  • devtools render-cli-reference --check — CLI reference is generated from command help

Required PR Gates

  • devtools verify --quick — full PR gate remains explicit
  • devtools verify — full PR gate remains explicit

Optional Confidence Gates

  • devtools build-package — deployment readiness gate; run when packaging or release confidence matters
  • nix flake check — deployment readiness gate; run when packaging or release confidence matters

Known Gaps

  • none for domains with affected claims
Additional gaps in zero-claim routed domains
  • docs_media: docs_media: No scenario for documentation freshness verification [owner: scenario-coverage; next: devtools scenario-projections], docs_media: README examples and media are not yet generated from executable scenario projections. [owner: docs-media; next: devtools render-docs-surface --check], docs_media: Screenshots and VHS media have no committed nonblank/readability verification. [owner: docs-media; next: devtools render-docs-surface --check]

Oracle / Cost

  • oracle mix: {"construction_sanity": 174, "drift_check": 2}
  • cost tier: {"static": 171, "unit": 5}
  • stable affected obligations: 176
  • agent judgment cells: 0

Problem: GitHub Actions billing is unavailable for the next month, so automatic push, pull_request, and schedule triggers create red checks without producing useful verification.\n\nWhat changed: keep the workflows available for manual workflow_dispatch only. PR-payload-only workflows now contain explicit disabled placeholders instead of pretending to validate unavailable event data.\n\nVerification: python YAML parse of all .github/workflows/*.yml and trigger inspection confirmed workflow_dispatch-only triggers.
@Sinity
Sinity marked this pull request as ready for review May 2, 2026 20:30
Copilot AI review requested due to automatic review settings May 2, 2026 20:30
@Sinity
Sinity merged commit 440b789 into master May 2, 2026
2 checks passed
@Sinity
Sinity deleted the feature/refactor/remove-cli-resource-policy branch May 2, 2026 20:30

@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: 37675efdcb

ℹ️ 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 .github/workflows/ci.yml Resolved
@Sinity
Sinity removed the request for review from Copilot May 2, 2026 20:53
Sinity added a commit that referenced this pull request May 7, 2026
## Summary

Removes the Polylogue CLI resource-policy layer and keeps workstation resource policy in the host/daemon boundary. The branch also includes the existing local reparse write-amplification fix so metadata-only reparses do not cascade through DELETE+INSERT behavior.

## Problem

The 2026-05-02 workstation pressure incident showed that `polylogue run --reparse ...` could become an opaque, heavy foreground workload. The first resource-boundary fix made that a Polylogue CLI concern via `--resource-mode`, transient systemd scopes, nice/ionice demotion, and an `off` escape hatch. That was the wrong ownership boundary: Polylogue is portable product code, while Sinnix and future `polylogued` supervision should own concrete workstation scheduling/storage policy.

The same incident also exposed unnecessary write amplification during same-hash reparse writes: metadata-only updates could still travel through a heavier replacement path instead of updating the changed fields in place.

## Solution

- Remove `--resource-mode` from `polylogue run` and `polylogue doctor`.
- Delete the CLI-side resource helper that launched systemd scopes or applied process-local demotion.
- Stop emitting `resource_mode`/`resource_boundary` fields from doctor output.
- Update CLI snapshots, generated docs, topology/proof docs, and tests for the smaller CLI surface.
- Keep the reparse ingest fix that avoids DELETE+INSERT cascades for same-hash metadata updates.
- Record the corrected design direction on #708/#716: Polylogue should expose workload facts and execution history; Sinnix/polylogued should own host policy.

## Verification

- `.venv/bin/python -m pytest -q tests/unit/pipeline/test_ingest_batch.py tests/unit/pipeline/test_parsing_service.py tests/unit/cli/test_run_command_runtime.py tests/unit/cli/test_check_support_runtime.py tests/unit/cli/test_check_rendering_plain_runtime.py tests/unit/cli/test_check.py tests/unit/cli/test_terminal_snapshots.py` -> 135 passed.
- `.venv/bin/python -m pytest -q tests/unit/cli/test_run_command_runtime.py tests/unit/cli/test_check_support_runtime.py tests/unit/cli/test_check_rendering_plain_runtime.py tests/unit/cli/test_check.py tests/unit/cli/test_terminal_snapshots.py` -> 93 passed before the ingest-helper mypy cleanup.
- `.venv/bin/ruff check` on changed Python files -> all checks passed.
- `direnv exec /realm/project/polylogue .venv/bin/mypy tests/unit/pipeline/test_ingest_batch.py` -> success.
- `git diff --check` -> clean.
- Pre-push `devtools verify --quick` under `direnv exec /realm/project/polylogue` -> all checks passed: ruff, mypy, render-all, topology, layering, file budgets, test ownership, schema roundtrip, cross-cuts, suppressions, manifests, witness lifecycle, proof-pack.

Refs #708.
Refs #716.
Sinity pushed a commit that referenced this pull request May 19, 2026
Bumps [pytest-randomly](https://github.com/pytest-dev/pytest-randomly)
from 4.0.1 to 4.1.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-randomly/blob/main/CHANGELOG.rst">pytest-randomly's
changelog</a>.</em></p>
<blockquote>
<h2>4.1.0 (2026-04-20)</h2>
<ul>
<li>
<p>Fix a crash with Faker installed when explicitly enabling and
disabling the plugin (via <code>-p randomly -p no:randomly</code>).</p>
<p>Thanks to mojosan77 for the report in <code>Issue
[#718](pytest-dev/pytest-randomly#718)
&lt;https://github.com/pytest-dev/pytest-randomly/issues/718&gt;</code>__.</p>
</li>
<li>
<p>Drop Python 3.9 support.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-randomly/commit/c412c8d6d328224a6a0cb9e4324438c62b46f4f5"><code>c412c8d</code></a>
Version 4.1.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-randomly/commit/657d9c356d1970bbe664b36446d4f8a9461e4988"><code>657d9c3</code></a>
Upgrade dependencies (<a
href="https://redirect.github.com/pytest-dev/pytest-randomly/issues/722">#722</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-randomly/commit/49c8c1bb487d03ca1bda2ac7567e4205bf82aae6"><code>49c8c1b</code></a>
Fix a crash with Faker installed and plugin disabled (<a
href="https://redirect.github.com/pytest-dev/pytest-randomly/issues/721">#721</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-randomly/commit/c9181c28607e990123ee480200ae2e684f58e7b6"><code>c9181c2</code></a>
Bump django from 5.2.12 to 5.2.13 (<a
href="https://redirect.github.com/pytest-dev/pytest-randomly/issues/717">#717</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-randomly/commit/1292cc060c8892d3cccc2bd67c44b3405a6693d4"><code>1292cc0</code></a>
Upgrade pre-commit to Python 3.14 (<a
href="https://redirect.github.com/pytest-dev/pytest-randomly/issues/716">#716</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-randomly/commit/56d13889650fa7f71df504c8ab810967fd3fb44e"><code>56d1388</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/pytest-dev/pytest-randomly/issues/715">#715</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-randomly/commit/43702c107ada21dca7e59836a8547ed1e62e77aa"><code>43702c1</code></a>
Upgrade dependencies (<a
href="https://redirect.github.com/pytest-dev/pytest-randomly/issues/714">#714</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-randomly/commit/c3dc97c20e2931b7557ab529703a6bf754df9110"><code>c3dc97c</code></a>
Bump pygments from 2.19.2 to 2.20.0 (<a
href="https://redirect.github.com/pytest-dev/pytest-randomly/issues/713">#713</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-randomly/commit/a2dee8a6b620f0ceaf385acfb1d0b778b0fd2892"><code>a2dee8a</code></a>
Improve Coverage.py configuration (<a
href="https://redirect.github.com/pytest-dev/pytest-randomly/issues/712">#712</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-randomly/commit/fed476639744207a10bc1742d7420fc413b555bf"><code>fed4766</code></a>
Upgrade dependencies (<a
href="https://redirect.github.com/pytest-dev/pytest-randomly/issues/711">#711</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-randomly/compare/4.0.1...4.1.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest-randomly&package-manager=uv&previous-version=4.0.1&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sinity added a commit that referenced this pull request Jun 5, 2026
…1766)

## Summary

Restores the `push` / `pull_request` CI triggers that were
**accidentally removed** by #718, re-enabling automatic test/lint/nix
gating on `master` and PRs.

## Problem

#718 (`refactor(cli): remove foreground resource policy`) — a PR whose
scope was entirely CLI resource policy, with **no mention of CI** —
silently reverted the trigger blocks on four workflows, leaving each
with only `workflow_dispatch:` (manual-only):

| Workflow | Before #718 | After #718 |
|----------|-------------|------------|
| `ci.yml` (lint + test ×3 Python) | push + pull_request | **dispatch
only** |
| `nix.yml` (nix build + flake check) | push + pull_request | **dispatch
only** |
| `actionlint.yml` | pull_request | **dispatch only** |
| `dep-audit.yml` | push + pull_request + weekly schedule | **dispatch
only** |

Consequence: the CI test gate has not run automatically since
**2026-05-02** (the last `ci.yml`/`nix.yml` runs are on `9029a37a`).
Across the ~20 commits merged since, **~61 unit-test failures
accumulated undetected** — see #1765. This is the root cause of the test
debt.

(`pr-policy.yml` and `proof-comment.yml` were also gutted by #718, but
those stay deleted — that was the intentional ceremonial-verification
cleanup in #1737, not collateral. `codeql.yml` retains a working trigger
and is unaffected.)

## Solution

Restore the exact pre-#718 `on:` blocks (verified against `git show
8b2b0fa~1:.github/workflows/<f>.yml`):
- `ci.yml` / `nix.yml`: `push: [master]` + `pull_request: [master]`
(opened/reopened/synchronize/ready_for_review)
- `actionlint.yml`: `pull_request: [master]` (paths:
`.github/workflows/**`, `.github/actions/**`)
- `dep-audit.yml`: push/pull_request (paths: `pyproject.toml`,
`uv.lock`, the workflow) + weekly `cron: 0 6 * * 1`

## Verification

```
python3 -c "import yaml; ..."  # all four on: blocks parse with push/pull_request restored
```

## ⚠️ Expected: re-enabling CI surfaces the pre-existing failures

Once merged, `ci.yml` will run on `master` and PRs and will be **red**
until the inherited test failures are cleared. That is the intended
signal, not a regression introduced here. The known failures are partly
fixed in **#1765** (collection error, keyset, config, stale tests) and
partly still open (a handful of real-bug candidates triaged in #1765's
body). Recommended order: merge #1765, work the remaining real failures,
then this fix's CI will go green. Merging this first is also fine — it
just makes the existing red state visible.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Enhanced workflow triggers to automatically run validation checks on
pull requests and commits targeting the master branch, improving
consistency of continuous integration checks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 50.F087 / P1: fixed-already at the checked revision: CI again has push and pull_request triggers targeting master (.github/workflows/ci.yml:11-14). The companion CodeQL, dependency-audit, Nix and actionlint workflows also have automatic triggers at the pin, so the reported dispatch-only removal is no longer present.

Only the rows listed above are dispositioned. Held findings remain open.

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