Repository navigation
Let pwc-cron re-finalize spooled curation traces - #1157
Merged
Merged
Conversation
The 10-26 hardening removed pwc-cron from pwc-production, so `pwc-cron enqueue_hf_daily_paper_curation --retry-trace` now fails with PermissionError on the 0700 recovery spool. Grant pwc-cron traversal of the spool and access to its curation-traces directory only, by ACL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
sudo pwc-cron enqueue_hf_daily_paper_curation --retry-trace <job>(documented indocs/operations.md) fails in production:The backend spools trace-finalization payloads as
pwc-productioninto a0700directory. Since the 10-26 hardening (restrict_cron_access),pwc-cronis no longer inpwc-production, so the operator command can't read the payloads. 8 jobs from the 11-20 HF-daily cohort are stuck withtrace_status = finalize_failed.Change
install_host_layout.share_curation_trace_spool(). It grantspwc-cron--xonrecovery-spoolandrwxonrecovery-spool/curation-traces, plus default ACLs so files either user writes stay readable and writable by both. Nothing else in the spool or in production state is shared.setfaclcalls.docs/deployment.md.Rollout
pwc-deploydoesn't runinstall_host_layout.py. After merge, apply it once withsudo python3 deploy/install_host_layout.py, run from a checkout at the merged commit. Then re-run--retry-tracefor the 8 stranded jobs.Validation
backend/tests/deployment/test_cron_environment.py: 32 tests pass, including the new one.test_cron_jobs_declare_bounded_execution_contracts, already fails onmain: a registered job now uses a3htimeout that the test's allowlist doesn't include. It's unrelated to this change.🤖 Generated with Claude Code
Note
Medium Risk
Changes production filesystem ACLs and cron/production isolation boundaries; misconfiguration could widen access beyond the intended trace directory until host layout is reapplied.
Overview
Fixes PermissionError on
pwc-cron enqueue_hf_daily_paper_curation --retry-traceafterrestrict_cron_accessremovedpwc-cronfrompwc-production, leaving backend-spooled traces unreadable.Adds
share_curation_trace_spool()ininstall_host_layout.py: it ensuresrecovery-spool/curation-tracesstayspwc-production-owned, grantspwc-crontraverse on the spool and rwx (plus reciprocal default ACLs) on that trace directory only, and runs it from host layout setup. A matching deployment test asserts thesetfacl/ensure_dirbehavior, anddocs/deployment.mddocuments this as the sole shared production app state and says to re-runinstall_host_layout.pyafter grant changes.Reviewed by Cursor Bugbot for commit 7995cc0. Bugbot is set up for automated code reviews on this repo. Configure here.