fix(remediation): link ntfy follow-ups to Forgejo work #169
No reviewers
Labels
No labels
area:authentication
area:flake-utilities
area:performance
area:tbd
host:chaos
host:electra
host:fleet
host:lyra
host:nova
host:vega
investigation
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
priority:high
priority:medium
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:auto-update-remediation
project:declarative-purity-cleanup
project:external-review
project:fleet-boundary-cleanup
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:nixos-build-deployment-pipeline
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
project:wiki-rebuild
repo:numtide/flake-utils
repo:numtide/nix-auth
repo:numtide/nixos-passthru-cache
repo:numtide/nix-relay
service:auto-update
service:mem0
service:nix
service:sillytavern
service:slskd
service:synthseek
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!169
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/remediation-follow-up-notifications"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Automated Update Remediationmilestone and keep ntfy secrets out of the model-capable jobValidation
./tests/nixos-update-remediation-regressions.shactionlintgit diff --checkRollout
No NixOS deployment is required. Once merged, the next update-mode workflow with published remediation will send the additional ntfy follow-up.
Refs #168
Automated code review
Reviewed commit:
4baab2c3b332c13bc505afbaa3ddf1b20dd1b073Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
The pull request successfully decouples ntfy notifications from the model-capable remediation job, introduces a bounded public issue/PR report via a new
notify-remediationworkflow step, and normalizes Forgejo JSON issue indices in the Python controller. Validation includes regression tests, actionlint, and diff checks. The changes align with security boundaries by keeping ntfy secrets out of the model sandbox and correctly migrate GitHub Actions output variables to Forgejo's nativeFORGEJO_OUTPUT.Blocking findings
None.
Important findings
None.
Suggestions
curl_args=() followed by "${curl_args[@]}" inside a step with set -eu enabled.
Impact: Bash versions prior to 4.4 trigger an unbound variable error when expanding an empty array with set -u, potentially aborting the notification step.
Suggested fix: Guard the expansion with a length check (e.g., if [ ${#curl_args[@]} -gt 0 ]; then) or use the POSIX-safe pattern "${curl_args[@]+"${curl_args[@]}"}" to ensure compatibility across runner environments.
Tests and validation
Questions
Review limitations
Diff coverage
.forgejo/workflows/attic-cache.yml: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchscripts/auto-update-workflow-route.sh: reviewed — included in a context-limited batchscripts/nixos-update-remediation.py: reviewed — included in a context-limited batchtests/nixos-update-remediation-integration.py: reviewed — included in a context-limited batchtests/nixos-update-remediation-regressions.sh: reviewed — included in a context-limited batchReview metadata
Responding to the automated review:
3d683f2validates the atomic report withjq -ce; malformed output is logged and replaced with an empty report, so no ntfy follow-up is sent.scan_status == 0guard is intentionally not applied. The controller writes the report atomically only after its bounded scan loop. A non-zero exit can therefore follow successful publication for earlier incidents; suppressing those verified links would hide the manual follow-up that the notification is meant to surface. Each workflow run uses a newmktempreport path, so the report cannot be stale from a prior run.Revalidated with
./tests/nixos-update-remediation-regressions.sh, actionlint, andgit diff --check.Review response before the follow-up push:
printf %s/curl --data-rawso backslashes in public URLs are preserved literally.publication_report_recordvalidation failures. A state marked published but lacking a valid public issue/PR reference is an integrity violation in the cross-job hand-off. Failing the scan is intentional fail-closed behavior; logging and continuing would lose required follow-up work.I will rerun the remediation regressions, workflow lint, and diff check before pushing the resulting commit.
Review response before the next push:
Accepted. The notifier intentionally uses Bash array and string features, so I will set
shell: bashexplicitly on that step rather than relying on runner defaults. I will extend the workflow regression assertion, rerun the remediation suite, actionlint, and diff check, then push.Review response before the next push:
GITHUB_OUTPUT.I will run the remediation regressions, workflow lint, and diff check before pushing.
Final readiness summary:
4baab2cis Ready to merge with no blocking or important findings../tests/nixos-update-remediation-regressions.sh, actionlint, andgit diff --check.The PR is ready for merge approval.