fix: normalize numeric local-plugin source refs - #2312
Conversation
🤖 Open Code ReviewTarget: PR #2312 🔍 OpenCodeReview found 5 issue(s) in this PR. 1.
|
✅ Automated Test Results: PASSEDAll tests passed (1/1 executed). memos_github_open_source/smoke: 1/1. Duration: 1s Branch: |
✅ Automated Test Results: PASSEDAll tests passed (1/1 executed). memos_github_open_source/smoke: 1/1. Duration: 1s Branch: |
✅ Automated Test Results: PASSEDAll tests passed (1/1 executed). memos_github_open_source/smoke: 1/1. Duration: 1s Branch: |
✅ Automated Test Results: PASSEDAll tests passed (1/1 executed). memos_github_open_source/smoke: 1/1. Duration: 1s Branch: |
✅ Automated Test Results: PASSEDAll tests passed (1/1 executed). memos_github_open_source/smoke: 1/1. Duration: 4s Branch: |
✅ Automated Test Results: PASSEDAll tests passed (1/1 executed). memos_github_open_source/smoke: 1/1. Duration: 4s Branch: |
✅ Automated Test Results: PASSEDAll tests passed (1/1 executed). memos_github_open_source/smoke: 1/1. Duration: 2s Branch: |
✅ Automated Test Results: PASSEDAll tests passed (1/1 executed). memos_github_open_source/smoke: 1/1. Duration: 2s Branch: |
✅ Automated Test Results: PASSEDAll tests passed (1/1 executed). memos_github_open_source/smoke: 1/1. Duration: 1s Branch: |
Summary
#10786401numeric-SHA formatting failure from the v2.0.18 dry-runRUNNER_TEMPso the existing Action upload step always finds themsource_refsvalue consistently with array inputs and tolerate evidence producers that omit either SHA aliasRoot cause
The v2.0.18 dry-run covered all 9 required evidence groups, but the draft returned
#10786401for the real short SHA10786401. Final postprocessing treated that value as an unknown PR number. The prior fix protected evidence generation, but not equivalent source-ref formats returned by the draft service.Safety boundaries
A bare numeric
#refis repaired only when it exactly equals a short or full SHA already present in collected evidence; numeric prefixes are never coerced. Bare SHA values and explicitsha:wrappers may use a unique evidence prefix. Explicit commit wrappers and same-repository commit URLs are resolved as SHAs. Explicit PR wrappers and same-repository pull URLs are accepted only when that PR is present in evidence. Repository URLs are trusted only when they matchGITHUB_REPOSITORY; absent repository context and foreign-repository URLs fail closed. Invented PRs, ambiguous SHA prefixes, invented refs, missing refs, and missing required commit coverage still stop the workflow.Duplicate evidence commit rows are collapsed by full SHA before prefix matching. Only references that actually resolve to collected evidence increment
normalized_evidence_backed_source_refs; unresolved and ambiguous references remain visible in diagnostics and fail validation.Failure-diagnostic I/O or a non-serializable validation report can no longer replace the real release-note validation error; an artifact-write failure is still visible as a CI warning. By default the files are now written under
$RUNNER_TEMP/memos-local-plugin-release-notes-failure, matching the workflow upload path.{ ok: true, needs_review: true }is explicitly tested and rejected.The public GitHub Release body is always re-rendered from validated
text_en, including the manual-notes path. The hiddendoc-agent-release-notes-jsonpayload continues to carrytext_cn,text_en, andsource_refs, so the Chinese website output and the 106 evidence contract remain unchanged. Package-only prerelease notes were already English.This PR changes only the MemOS local-plugin release-note caller and tests. It does not modify 106 Doc Agent, CLI, cloud-plugin, weekly release notifications, npm publication, tag creation, or Release creation.
Verification
57/57186/186memos-local-plugin-v2.0.17..bc9ccd1e): 35 path commits and 57 changed files compacted into 9 topics, 9/9 covered, 0 missing, 0 invalid; injected#10786401normalized once; 7 final items