mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-10-22 20:14:07 +08:00
fix: 上游巡检收窄集合对比范围并支持已审查暂缓
Collections install only their declared children: the client copies each selected child path at the pinned ref. Yet `outdated` compared the whole upstream repository, so CLI sources, end-to-end tests and changesets forced repins. Compare the declared child paths plus root license/notice files instead; undeclared upstream skills are still reported as `new-skill`. A pin kept on purpose after review was reported again every week, so the tracking issue could never close. A reviewed `upstream-health-hold.json` beside `entry.json` now reports its listed `upstream-path-change`/`outdated` findings as `held` (not actionable) while the pin and the installed-scope content at the reviewed upstream head are unchanged. Otherwise the findings return with an actionable `stale-hold`. Broken, unreachable, `new-skill` and `unpinned` findings cannot be held. CI tests require every hold to be well-formed and to match its entry's `source.ref`. A network error while checking a reviewed head stays `unreachable`. `outdated` rows in the tracking issue now link to the GitHub compare view. The summary JSON reports the held count, and the closing comment mentions remaining holds. Both READMEs document the comparison scope, the hold format and the links. Validation: 42 upstream-health, 10 collection-generator, 51 catalog-metadata and 19 i18n tests pass. Catalog metadata, i18n (0 errors, 106 existing warnings) and translation-freshness checks pass. actionlint and `git diff --check` are clean. A live run over 111 entries reports no broken or unknown entries, and humanlayer-skills is no longer `outdated`. A temporary geo-optimizer hold turned both of its findings into `held` with `actionable: false`; it is not committed. Refs #213.
This commit is contained in:
11
.github/workflows/upstream-health.yml
vendored
11
.github/workflows/upstream-health.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
||||
import json
|
||||
from pathlib import Path
|
||||
summary = json.loads(Path("summary.json").read_text())
|
||||
for key in ("broken", "actionable", "unknown"):
|
||||
for key in ("broken", "actionable", "unknown", "held"):
|
||||
print(f"{key}={str(summary[key]).lower()}")
|
||||
PY
|
||||
cat report.md >> "$GITHUB_STEP_SUMMARY"
|
||||
@@ -55,6 +55,7 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
ACTIONABLE: ${{ steps.check.outputs.actionable }}
|
||||
UNKNOWN: ${{ steps.check.outputs.unknown }}
|
||||
HELD: ${{ steps.check.outputs.held }}
|
||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -65,7 +66,7 @@ jobs:
|
||||
{
|
||||
echo "_Updated by [Upstream Health]($RUN_URL) on $(date -u +%Y-%m-%d)._"
|
||||
echo
|
||||
echo "Fix entries through a normal PR: repoint or remove \`gone\` entries, correct \`bad-*\` paths, and review upstream changes before bumping \`source.ref\` for \`outdated\` entries (rerun \`scripts/gen-collection-children.py\` for collections). \`unreachable\` means a network error, not a confirmed failure."
|
||||
echo "Fix entries through a normal PR: repoint or remove \`gone\` entries, correct \`bad-*\` paths, and review upstream changes before bumping \`source.ref\` for \`outdated\` entries (rerun \`scripts/gen-collection-children.py\` for collections); a reviewed decision to keep the current pin can be recorded in \`<kind>/<id>/upstream-health-hold.json\`. \`unreachable\` means a network error, not a confirmed failure."
|
||||
echo
|
||||
cat report.md
|
||||
} > body.md
|
||||
@@ -78,7 +79,11 @@ jobs:
|
||||
gh issue create --title "Upstream health report" --label "$label" --body-file body.md
|
||||
fi
|
||||
elif [ -n "$issue" ]; then
|
||||
gh issue comment "$issue" --body "All external entries resolve upstream and are current as of $RUN_URL. Closing."
|
||||
closing="All external entries resolve upstream and are current as of $RUN_URL."
|
||||
if [ "${HELD:-0}" -gt 0 ]; then
|
||||
closing="All external entries resolve upstream as of $RUN_URL; $HELD finding(s) remain under reviewed holds (see the run summary)."
|
||||
fi
|
||||
gh issue comment "$issue" --body "$closing Closing."
|
||||
gh issue close "$issue"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user