Repository navigation
Fix incomplete daily Graft intelligence reports - #77844
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
✅ PR Specification Reviewer completed successfully! Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. 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. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. 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.
|
|
✅ 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.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
There was a problem hiding this comment.
Reviewed the changed workflow, Graft MCP mounts, generated lock wiring, and contract tests. No actionable correctness or regression findings identified in the changed lines. Static review only; tests were not run per review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.5K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-container mounts, .git masking, and graph-health publication gates interact across runner, MCP, and Graft boundaries, requiring runtime integration validation that has not been performed.
No open issues 🎉
What changed in this PR
This PR addresses the incomplete Graft reports described in #77843 by exposing the runner-built graph to the MCP server, correcting activity collection, and preventing reports when graph analysis is unavailable.
Changes:
- Mount the graph and checkout read-only, mask
.git, and fail setup if the wiring graph is missing. - Fetch full Git history and stop suppressing activity-collection failures.
- Require incomplete reporting when graph checks or mapping fail, with contract tests covering the configuration.
| File | Description |
|---|---|
scripts/workflow-tool-contracts.test.cjs |
Adds assertions for history, graph mounts, and incomplete-report instructions. |
.github/workflows/shared/mcp/graft.md |
Validates the wiring graph and configures read-only MCP mounts. |
.github/workflows/daily-graft-intelligence.md |
Enables full history, surfaces collection failures, and guards report publication. |
.github/workflows/daily-graft-intelligence.lock.yml |
Updates the generated workflow to reflect the source changes. |
Review effort: Balanced (dynamic)
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs, /tdd, /codebase-design, and /grill-with-docs to a small, focused diff. The direction is right: full-history checkout, no more silent || true on the activity log, and a deterministic build guard for the wiring graph. Posting as COMMENT because the Graft CLI behavior could not be verified in this sandbox.
📋 Key Themes and Highlights
Key Themes
- Unverified Graft runtime assumptions: the
.gitmask, read-only--dircache, and.graph/wiring.jsonlayout are not confirmed against Graft 0.8.0. The npm fetch failed on a TLS error in this sandbox, so the CLI flags were not checked. - Mount escaping mismatch:
graft.mdescapes\${GITHUB_WORKSPACE}whilekreuzberg.mddoes not. Pick one convention and fix the test. - Failure handling is prompt-only: steps 3 and 4 depend on the agent calling
report_incomplete. The build step is the only deterministic gate. - Test depth: the new contract test checks source substrings, so it cannot catch behavioral breakage.
Positive Highlights
- ✅ Removing
|| truemakes a broken activity collection fail loudly instead of publishing a thin report. - ✅
fetch-depth: 0is needed for the 24-hourgit log, and the change is clearly explained. - ✅ The committed lock file matches the source at HEAD, and the new test passes 4/4 on a clean export.
@copilot please address the review comments above, starting with the mount escaping and the runtime verification of the .git mask.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| env: | ||
| GRAFT_DIR: "/tmp/gh-aw/graft" | ||
| mounts: | ||
| - \${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:ro |
There was a problem hiding this comment.
[/codebase-design] The mount source escaping differs from the existing convention. kreuzberg.md line 10 uses unescaped ${GITHUB_WORKSPACE}, while this file uses \${GITHUB_WORKSPACE}. The new test asserts the escaped form, so it locks in whichever form is wrong.
💡 Suggested check
Compare the resolved mount strings in the compiled daily-graft-intelligence.lock.yml with what the runtime actually receives, then make both files match and update the test regex.
@copilot please address this.
| GRAFT_DIR: "/tmp/gh-aw/graft" | ||
| mounts: | ||
| - \${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:ro | ||
| - /tmp/gh-aw/graft-empty-git:\${GITHUB_WORKSPACE}/.git:ro |
There was a problem hiding this comment.
[/diagnosing-bugs] Masking .git with an empty directory is unverified. If Graft reads git metadata at query time, the MCP server or graft check could fail or return stale results, and the build-time wiring check will not catch that.
💡 Suggested verification
Run graft_check and one graft_ask against the masked mount in a live run, and add a comment explaining why .git is masked. The new test only checks source text, so it cannot confirm this.
@copilot please address this.
| mounts: | ||
| - \${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:ro | ||
| - /tmp/gh-aw/graft-empty-git:\${GITHUB_WORKSPACE}/.git:ro | ||
| - /tmp/gh-aw/graft:/tmp/gh-aw/graft:ro |
There was a problem hiding this comment.
[/diagnosing-bugs] The server gets --dir=/tmp/gh-aw/graft, but that path is mounted :ro on this line. If Graft writes cache or deep-layer state at runtime, the MCP server will fail after the build step has already passed.
💡 Suggested check
Confirm the mcp subcommand only reads the graph. If it writes, mount the directory read-write for the server, or point --dir at a writable path.
@copilot please address this.
| mkdir -p "$GRAFT_DIR" | ||
| mkdir -p "$GRAFT_DIR" /tmp/gh-aw/graft-empty-git | ||
| npx -y @nanonets/graft@0.8.0 --dir "$GRAFT_DIR" build "$GITHUB_WORKSPACE" | ||
| test -s "$GRAFT_DIR/.graph/wiring.json" || { echo "::error::Graft wiring graph is missing" >&2; exit 1; } |
There was a problem hiding this comment.
[/diagnosing-bugs] The guard checks $GRAFT_DIR/.graph/wiring.json, an internal Graft 0.8.0 layout that this PR does not document or verify. A future Graft pin bump that moves the file will break the build until someone updates this line.
💡 Suggested fix
Add a comment linking the Graft source that defines this path, or gate on the exit status of graft check instead of a file path.
@copilot please address this.
| 2. If the file is empty, call `noop` with a message that no repository files changed in the last 24 full hours. | ||
| 3. Run `graft graft_check` through bash to confirm the graph is current. | ||
| 4. Run `graft graft_map` through bash to identify the most connected directories, symbols, and hotspots. | ||
| 3. Run `graft graft_check` through bash to confirm the wiring graph is current. The optional deep layer may report `NO GRAPH`; rely on the wiring graph check, not the deep-layer status. If the wiring graph is missing, stale, or unusable, call `safeoutputs report_incomplete` and stop without creating a daily report. |
There was a problem hiding this comment.
[/grill-with-docs] Step 3 re-runs a check the build step already enforces with set -euo pipefail (graft.md line 11). The stale-or-unusable rule therefore depends on the agent judging the output, while the build step is the only deterministic gate.
💡 Suggested change
Either drop the duplicate instruction, or state in the step why the agent must re-check at runtime and what the failure path is.
@copilot please address this.
| } | ||
| }); | ||
|
|
||
| test("Daily Graft uses full history and exposes the built wiring graph to its MCP server", () => { |
There was a problem hiding this comment.
[/tdd] The new test matches regex patterns against source text, so it would still pass if the mounts or build guard were broken in a way that keeps the same strings. It also asserts the escaped mount form questioned above, which locks that form in.
💡 Suggested test
Keep the source assertions for regressions, and add a test that parses the compiled lock and checks the mount and --dir arguments as structured values rather than substrings.
@copilot please address this.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "fb6753e5ed7a683a61ed7662875cae1ae208e112",
"kind": "requested",
"schema_version": "1",
"state": "308d8fc60dcf14c279ac30a3fdb758fb4002b181f37b6d086fc357986bde9708",
"work": [
"262fd73851af70a2fab6fb28e260511b37214f28c108ab03d490dff708feddba",
"55b5871cb4d30aa4830129c2abc3ec76b8196daea212ce641f9af34ecff3261e",
"76ddeecc2ae01d0beb85d4a418b870b2c85d36aaba497518da8c21be406dbbb4",
"8de311b31ae2c063f4e602eeccc27295757e595bec72a517e8fbc2dccd367dbc",
"93d6786577750e2de476253e907a81d5d16c3674baae02b483c601419b093ab9",
"a6035d81a4381e9cd7e268e4a29bd7a6ebc22526a65143a4ef07b3e61cc47ab4"
],
"workflow": "pr-sous-chef"
}
|
…gence-fix-daily-analysis Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
| env: | ||
| GRAFT_DIR: "/tmp/gh-aw/graft" | ||
| mounts: | ||
| - \${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:ro |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
| git log --since="24 hours ago" --date=iso-strict \ | ||
| --format='commit %H%nAuthor: %an <%ae>%nDate: %ad%nSubject: %s%n' \ | ||
| --name-status > /tmp/gh-aw/agent/graft-recent-activity.txt || true | ||
| --name-status > /tmp/gh-aw/agent/graft-recent-activity.txt |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |
The Graft MCP server could not access the graph built on the runner. A shallow checkout also made a single commit appear to add the entire repository.
.git, and fail if the wiring graph is missing.