Repository navigation
fix: precompute Daily File Diet source metrics - #71161
Conversation
Replace permission-sensitive agent discovery pipelines with a deterministic filesystem-only preparation step and a scoped metrics read. Require noop completion for healthy files and cover size thresholds, nested files, symlinks and missing tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Ponytail Reviewer completed successfully!
|
There was a problem hiding this comment.
L91: delete: duplicated healthy_threshold packet field. Keep the existing step-2 800-line threshold as the sole source of truth.
net: -3 lines possible.
Generated by ✂️ Ponytail Reviewer for #71161 · codex · gpt56 · 9.81 AIC · ⌖ 5.43 AIC · ⊞ 14.8K
Comment /ponytail to run again
| fs.mkdirSync(path.dirname(outputPath), { recursive: true }); | ||
| fs.writeFileSync(outputPath, JSON.stringify({ | ||
| healthy_threshold: 800, | ||
| source_file_count: files.length, |
There was a problem hiding this comment.
L91: delete: duplicated healthy_threshold packet field. Keep the existing step-2 800-line threshold as the sole source of truth.
There was a problem hiding this comment.
Review summary
No actionable blocking issues found in the changed lines. The prepared metrics packet is fail-closed, deterministic, and the regression coverage exercises threshold, recursion, ties, exclusions, symlinks, missing tests, and missing source directories. Static review only; tests were not run.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · 1.88 AIC · ⌖ 0.543 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
🔵 Needs a closer look
The production preparation path has unresolved correctness and filesystem-boundary issues requiring correction and human validation.
2 open issues
What changed in this PR
Updates Daily File Diet, gh-aw’s Go-file size monitoring workflow, to avoid agent-side shell discovery failures.
Changes:
- Precomputes deterministic source-file and paired-test line counts.
- Replaces shell discovery with a fixed metrics read and requires explicit safe-output completion.
- Adds regression fixtures and regenerates the executable workflow while retaining existing access limits.
| File | Description |
|---|---|
actions/setup/js/workflow_tool_policy_alignment.test.cjs |
Tests metrics preparation, edge cases, and tool permissions. |
.github/workflows/daily-file-diet.md |
Adds metrics preparation and packet-based analysis instructions. |
.github/workflows/daily-file-diet.lock.yml |
Regenerates preparation steps and shell grants. |
Review effort: Max
| sandbox: | ||
| agent: | ||
| id: awf | ||
| steps: |
| } | ||
| } | ||
| } | ||
| scan("pkg"); |
|
🎉 This pull request is included in a new release. Release: |

Summary
Fix the Daily File Diet missing-tool failure observed in run 39781997070.
find -execshell grant with an exact read of the prepared metrics packet; keep restricted shell permissions, Serena, credentials and output limits unchanged.noopsafe output for healthy files, and report missing metrics rather than guessing or retrying shell discovery.Validation
make recompile— all 346 workflows compiled.make fmt-cjs && make lint-cjs— passed (existing warnings only).npm exec -- vitest run workflow_tool_policy_alignment.test.cjs— 19 passed../gh-aw compile daily-file-diet --no-check-update --schedule-seed github/gh-aw --strict --shellcheck --actionlint— passed.PATH="/opt/homebrew/bin:$PATH" make agent-report-progress— passed, including impacted tests and workflow drift checks.Dry-run compilation is unavailable because the compiler rejects host steps/pre-agent steps and the workflow's existing custom Serena MCP server. No workflow was dispatched or rerun; no live success claim is made.
Security-relevant source changes