Skip to content

Commit f80ff35

Browse files
authored
chore(skills): Write framework-updates digest to repo-relative path (#22578)
This should fix printing the summary in the action output.
1 parent 110f6c4 commit f80ff35

3 files changed

Lines changed: 23 additions & 10 deletions

File tree

.agents/skills/track-framework-updates/SKILL.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,15 @@ For each release or RFC that plausibly needs SDK work, draft one concrete, actio
107107

108108
### Step 6: Write output artifacts
109109

110-
The `collect_updates.py` script in Step 1 prints its output path, e.g.:
110+
Write all files to `.agents/skills/track-framework-updates/output/` **relative to the repository root** — never relative paths like `output/` from the workspace root.
111111

112-
```
113-
Wrote /abs/path/to/.agents/skills/track-framework-updates/output/framework-updates-raw.json: ...
114-
```
115-
116-
Use that printed path to derive the output directory. All three files must be written to the **same directory** as `framework-updates-raw.json` — never relative paths like `output/` from the workspace root.
112+
Do NOT reuse the absolute directory printed by `collect_updates.py` in Step 1: in CI, Bash commands run in a sandbox where the workspace is mounted at a different absolute path (e.g. `/github/workspace/...`) that does not exist for the Write tool. The repo-relative path is valid in both contexts.
117113

118114
Produce **three files**:
119115

120-
1. The raw JSON was already written by Step 1 no action needed.
121-
2. **`<output-dir>/framework-updates-digest.json`** — structured, machine-readable digest. Follow the schema in `assets/digest-schema.json`.
122-
3. **`<output-dir>/framework-updates-digest.md`** — human-readable digest. Follow the structure in `assets/digest-template.md`:
116+
1. `.agents/skills/track-framework-updates/output/framework-updates-raw.json`already written by Step 1, no action needed.
117+
2. **`.agents/skills/track-framework-updates/output/framework-updates-digest.json`** — structured, machine-readable digest. Follow the schema in `assets/digest-schema.json`.
118+
3. **`.agents/skills/track-framework-updates/output/framework-updates-digest.md`** — human-readable digest. Follow the structure in `assets/digest-template.md`:
123119
- Group by Client-Side / Server-Side / Meta-Framework / Platform / Libraries.
124120
- Omit frameworks with no activity.
125121
- Include a "Run notes" section only if a fetcher reported errors.

.agents/skills/track-framework-updates/scripts/collect_updates.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,16 @@ def main() -> None:
116116
len(f["discussions"]) + len(f["rfcs"]) + len(f["rssItems"])
117117
for f in frameworks
118118
)
119+
# Report a cwd-relative path: in CI this script runs inside a sandbox whose
120+
# absolute paths (e.g. /github/workspace/...) don't exist outside it, so an
121+
# absolute path would mislead the digest-writing step.
122+
out_display = args.out
123+
try:
124+
out_display = os.path.relpath(args.out)
125+
except ValueError:
126+
pass
119127
print(
120-
f"Wrote {args.out}: {len(frameworks)} frameworks with activity, "
128+
f"Wrote {out_display}: {len(frameworks)} frameworks with activity, "
121129
f"{total_releases} releases, {total_links} links "
122130
f"(last {args.since_days} days)."
123131
)

.github/workflows/track-framework-updates.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ jobs:
7474
DIGEST=".agents/skills/track-framework-updates/output/framework-updates-digest.md"
7575
SCRIPT=".agents/skills/track-framework-updates/scripts/write_job_summary.py"
7676
77+
# The digest may land elsewhere if Claude derived the output dir from a
78+
# sandboxed absolute path — fall back to searching the workspace.
79+
if [ ! -f "$DIGEST" ]; then
80+
FOUND=$(find . -name framework-updates-digest.md -not -path './node_modules/*' -print -quit)
81+
if [ -n "$FOUND" ]; then
82+
DIGEST="$FOUND"
83+
fi
84+
fi
85+
7786
if [ -f "$EXEC_FILE" ]; then
7887
python3 "$SCRIPT" "$EXEC_FILE" "$DIGEST" >> "$GITHUB_STEP_SUMMARY"
7988
elif [ -f "$DIGEST" ]; then

0 commit comments

Comments
 (0)