Skip to content

Fix incomplete daily Graft intelligence reports - #77844

Merged
pelikhan merged 6 commits into
mainfrom
copilot/graft-intelligence-fix-daily-analysis
Nov 14, 2026
Merged

pelikhan merged 6 commits into
mainfrom
copilot/graft-intelligence-fix-daily-analysis

Conversation

@gh-aw-bot

@gh-aw-bot gh-aw-bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

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.

  • Graph: Mount the graph and checkout read-only, mask .git, and fail if the wiring graph is missing.
  • Activity: Fetch full history and surface collection failures.
  • Reporting: Mark missing, stale, or unusable graph analysis as incomplete instead of publishing a daily report.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@gh-aw-bot gh-aw-bot changed the title [WIP] Fix incomplete Graft graph analysis for 2026-11-14 Fix incomplete daily Graft intelligence reports Nov 14, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 14, 2026 20:28
Copilot AI adaptive review requested due to automatic review settings November 14, 2026 20:28
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

Potential security threats were detected in the agent output. Detected threat types: prompt injection.

Review the workflow run logs for details.

PR Specification Reviewer

Outcome: reported_action

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.

Generated by PR Specification Reviewer for #77844 · copilot · gpt56 · ~3 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

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.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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: reported_no_action

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.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.6K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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 analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #77844 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-11600572-1509-444a-ad77-ab4bc76a940d","parents":[],"payload":{"id":"ldg-3e3a5dcf-9276-4280-a1ba-c742de990a72","operation":"append","value":{"finding_count":0,"head_sha":"fb6753e5ed7a683a61ed7662875cae1ae208e112","outcome":"no_findings"}},"sha":"sha256:0346d1930568f3135d88f694a8356afd19d743ef808d9b2072ddd4a8cc4c551b","timestamp":"2026-11-14T20:36:00.144Z","type":"ledger_append","version":1}
History

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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)

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-3aa98e65-1955-41c1-b18f-90376a1cc592","parents":[],"payload":{"id":"ldg-c7d920ef-8754-47bc-9b48-58fe7188d8dc","operation":"append","value":{"finding_count":0,"head_sha":"fb6753e5ed7a683a61ed7662875cae1ae208e112","outcome":"aligned"}},"sha":"sha256:9b9489949a2aed17a0a72e32868cb5c572222037f9db7485924c888fbc6cb792","timestamp":"2026-11-14T20:38:44.336Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .git mask, read-only --dir cache, and .graph/wiring.json layout 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.md escapes \${GITHUB_WORKSPACE} while kreuzberg.md does 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 || true makes a broken activity collection fail loudly instead of publishing a thin report.
  • ✅ fetch-depth: 0 is needed for the 24-hour git 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

Comment thread .github/workflows/shared/mcp/graft.md Outdated
env:
GRAFT_DIR: "/tmp/gh-aw/graft"
mounts:
- \${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:ro

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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.

Comment thread .github/workflows/shared/mcp/graft.md Outdated
GRAFT_DIR: "/tmp/gh-aw/graft"
mounts:
- \${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:ro
- /tmp/gh-aw/graft-empty-git:\${GITHUB_WORKSPACE}/.git:ro

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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.

Comment thread .github/workflows/shared/mcp/graft.md Outdated
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; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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", () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator Author

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (.github/workflows/shared/mcp/graft.md:22): address unresolved feedback - Review comment
  3. Review (.github/workflows/shared/mcp/graft.md:23): address unresolved feedback - Review comment
  4. Review (.github/workflows/shared/mcp/graft.md:24): address unresolved feedback - Review comment
  5. Review (.github/workflows/shared/mcp/graft.md:10): address unresolved feedback - Review comment
  6. Review (.github/workflows/daily-graft-intelligence.md:87): address unresolved feedback - Review comment
  7. Review (scripts/workflow-tool-contracts.test.cjs:55): address unresolved feedback - Review comment

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"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

…gence-fix-daily-analysis

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Comment thread .github/workflows/shared/mcp/graft.md Outdated
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
gh-aw-bot and others added 2 commits November 14, 2026 22:06
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>
@pelikhan
pelikhan merged commit 81494e2 into main Nov 14, 2026
45 checks passed
@pelikhan
pelikhan deleted the copilot/graft-intelligence-fix-daily-analysis branch November 14, 2026 23:43
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[graft-intelligence] Daily Graft Intelligence 2026-11-14: analysis incomplete, Graft graph not built

5 participants