feat(auto-update): track temporary pin lifecycle #137

Merged
nimmo merged 4 commits from issue-131-pin-lifecycle into main 2026-08-08 21:54:39 +01:00
Owner

Refs #131

Implements controller-owned metadata and reverse-patch lifecycle controls for accepted temporary pins. Scheduled/manual trusted runs retest current nixpkgs in isolated worktrees, deduplicate unchanged failures, comment on recoveries or changed failure modes, and create only review-only removal PRs.

Validation: formatter, ShellCheck, actionlint, auto-update regressions, Nova benchmark, remediation regressions, lifecycle integration/regressions, and nix flake check all passed.

No deployment, merge, automatic issue closing, or live pin-removal evidence is claimed.

Refs #131 Implements controller-owned metadata and reverse-patch lifecycle controls for accepted temporary pins. Scheduled/manual trusted runs retest current nixpkgs in isolated worktrees, deduplicate unchanged failures, comment on recoveries or changed failure modes, and create only review-only removal PRs. Validation: formatter, ShellCheck, actionlint, auto-update regressions, Nova benchmark, remediation regressions, lifecycle integration/regressions, and `nix flake check` all passed. No deployment, merge, automatic issue closing, or live pin-removal evidence is claimed.
feat(auto-update): track temporary pin lifecycle
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m15s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 5m58s
4721cf4c61
Author
Owner

Automated code review

Reviewed commit: 34e410d5baab112f9f8c75e68e406d93d1d2895e

Verdict: Ready to merge

No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.

Overall assessment

Implements controller-owned metadata and reverse-patch lifecycle controls for accepted temporary pins. Adds a scheduled/manual pin-lifecycle job that retests unpinned candidates in isolated worktrees, deduplicates unchanged failures, comments on recoveries or changed failure modes, and creates review-only removal PRs using Refs. Updates policy validation, incident bundle generation, and remediation publication to enforce strict bounds, deterministic metadata, and non-closing PR semantics.

Blocking findings

None.

Important findings

None.

Suggestions

  • Python 3.11+ dependency for datetime.now(UTC) (scripts/nixos-pin-lifecycle.py:26; high confidence)
    from datetime import UTC, date, datetime, timedelta
    ... datetime.now(UTC)
    Impact: The script will fail on runners or environments using Python versions older than 3.11, which lack the UTC timezone class.
    Suggested fix: Verify the runner's Python version meets 3.11+, or replace datetime.now(UTC) with datetime.utcnow() for broader compatibility.

  • Strict UTC timestamp regex may reject valid incident formats (scripts/nixos-update-remediation.py:43; medium confidence)
    UTC_TIMESTAMP = re.compile(r"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$")
    Impact: Incidents containing fractional seconds (e.g., .123Z) or explicit timezone offsets (e.g., +00:00) will fail validation, even if they are otherwise valid ISO 8601 timestamps.
    Suggested fix: Relax the regex to allow optional fractional seconds and standard timezone designators, or document that only strict Z-suffixed timestamps without fractions are supported.

Tests and validation

  • No configured deterministic checks.

Questions

  • Does the CI runner environment guarantee Python 3.11+ for executing nixos-pin-lifecycle.py?
  • Are there existing incident bundles or upstream generators that might produce timestamps with fractional seconds or non-Z timezone offsets?

Review limitations

  • Review is based solely on the provided diff and repository context; runtime behavior, Nix evaluation results, and actual Forgejo runner logs were not observed.
  • Security analysis of external dependencies (e.g., Tea CLI) and network boundaries relies on provided documentation rather than direct inspection.

Diff coverage

  • .forgejo/workflows/attic-cache.yml: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • remediation/nova-policy.json: reviewed — included in a context-limited batch
  • scripts/nixos-pin-lifecycle.py: reviewed — included in a context-limited batch
  • scripts/nixos-update-incident-bundle.sh: reviewed — included in a context-limited batch
  • scripts/nixos-update-remediation.py: reviewed — included in a context-limited batch
  • tests/nixos-pin-lifecycle-integration.py: reviewed — included in a context-limited batch
  • tests/nixos-pin-lifecycle-regressions.sh: reviewed — included in a context-limited batch
  • tests/nixos-update-remediation-integration.py: reviewed — included in a context-limited batch
  • tests/nixos-update-remediation-regressions.sh: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: qwen3.6:35b-a3b-q8_0
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 4
  • Previous automated review: updated
  • Findings: 2
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `34e410d5baab112f9f8c75e68e406d93d1d2895e` ## Verdict: Ready to merge No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory. ### Overall assessment Implements controller-owned metadata and reverse-patch lifecycle controls for accepted temporary pins. Adds a scheduled/manual pin-lifecycle job that retests unpinned candidates in isolated worktrees, deduplicates unchanged failures, comments on recoveries or changed failure modes, and creates review-only removal PRs using Refs. Updates policy validation, incident bundle generation, and remediation publication to enforce strict bounds, deterministic metadata, and non-closing PR semantics. ### Blocking findings None. ### Important findings None. ### Suggestions - **Python 3.11+ dependency for datetime.now(UTC)** (scripts/nixos-pin-lifecycle.py:26; high confidence) from datetime import UTC, date, datetime, timedelta ... datetime.now(UTC) Impact: The script will fail on runners or environments using Python versions older than 3.11, which lack the UTC timezone class. Suggested fix: Verify the runner's Python version meets 3.11+, or replace datetime.now(UTC) with datetime.utcnow() for broader compatibility. - **Strict UTC timestamp regex may reject valid incident formats** (scripts/nixos-update-remediation.py:43; medium confidence) UTC_TIMESTAMP = re.compile(r"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$") Impact: Incidents containing fractional seconds (e.g., .123Z) or explicit timezone offsets (e.g., +00:00) will fail validation, even if they are otherwise valid ISO 8601 timestamps. Suggested fix: Relax the regex to allow optional fractional seconds and standard timezone designators, or document that only strict Z-suffixed timestamps without fractions are supported. ### Tests and validation - No configured deterministic checks. ### Questions - Does the CI runner environment guarantee Python 3.11+ for executing nixos-pin-lifecycle.py? - Are there existing incident bundles or upstream generators that might produce timestamps with fractional seconds or non-Z timezone offsets? ### Review limitations - Review is based solely on the provided diff and repository context; runtime behavior, Nix evaluation results, and actual Forgejo runner logs were not observed. - Security analysis of external dependencies (e.g., Tea CLI) and network boundaries relies on provided documentation rather than direct inspection. ### Diff coverage - `.forgejo/workflows/attic-cache.yml`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `remediation/nova-policy.json`: **reviewed** — included in a context-limited batch - `scripts/nixos-pin-lifecycle.py`: **reviewed** — included in a context-limited batch - `scripts/nixos-update-incident-bundle.sh`: **reviewed** — included in a context-limited batch - `scripts/nixos-update-remediation.py`: **reviewed** — included in a context-limited batch - `tests/nixos-pin-lifecycle-integration.py`: **reviewed** — included in a context-limited batch - `tests/nixos-pin-lifecycle-regressions.sh`: **reviewed** — included in a context-limited batch - `tests/nixos-update-remediation-integration.py`: **reviewed** — included in a context-limited batch - `tests/nixos-update-remediation-regressions.sh`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: qwen3.6:35b-a3b-q8_0 - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 4 - Previous automated review: updated - Findings: 2 </details>
fix(auto-update): retain pin tracking ownership
Some checks failed
Build and Push Attic Cache / test (pull_request) Successful in 1m15s
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
AI pull-request review / review (pull_request) Has been cancelled
893473fb1d
fix(auto-update): deduplicate recovered pin retests
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m17s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 6m1s
32006c1b63
nimmo force-pushed issue-131-pin-lifecycle from 32006c1b63
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m17s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 6m1s
to 34e410d5ba
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m21s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 4m50s
2026-08-08 21:48:04 +01:00
Compare
Author
Owner

Rebased onto current main 9308e9f and resolved the retained automated-review finding at 34e410d.

The scope is now explicit in code, documentation, and regression coverage: the controller has no accepted non-pin remediation path. Ineligible or unsafe incidents remain diagnosis-only and never publish a PR; every validated proposal is deliberately a temporary package/source pin with lifecycle metadata. Therefore temporary_pin_pr_body() uses non-closing Refs for all PRs this controller can publish, keeping the assigned tracking issue open through recovery, removal review, deployment, and no-op evidence.

Fresh validation on the rebased six-host tree passed:

  • pin lifecycle, guarded remediation, auto-update, and Nova benchmark regressions
  • ShellCheck and actionlint
  • nix flake check including formatting
  • git diff --check

No deployment or updater run was forced.

Rebased onto current main `9308e9f` and resolved the retained automated-review finding at `34e410d`. The scope is now explicit in code, documentation, and regression coverage: the controller has no accepted non-pin remediation path. Ineligible or unsafe incidents remain diagnosis-only and never publish a PR; every validated proposal is deliberately a temporary package/source pin with lifecycle metadata. Therefore `temporary_pin_pr_body()` uses non-closing `Refs` for all PRs this controller can publish, keeping the assigned tracking issue open through recovery, removal review, deployment, and no-op evidence. Fresh validation on the rebased six-host tree passed: - pin lifecycle, guarded remediation, auto-update, and Nova benchmark regressions - ShellCheck and actionlint - `nix flake check` including formatting - `git diff --check` No deployment or updater run was forced.
nimmo merged commit 28acc76152 into main 2026-08-08 21:54:39 +01:00
Sign in to join this conversation.
No reviewers
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config!137
No description provided.