fix: stale stub diagnostics + remove reason_code from user-facing output#49
Merged
Conversation
Stale stub detection: - bootstrap_workspace.py: add _stale_stub_diagnostic() to distinguish stale workspace stub (version mismatch) from truly missing bundle - inspection.py: workspace-level checks prefer enriched diagnostic message; payload-level checks keep generic "refresh payload" - gate_output.py: neutral hint covering both stale stub and missing bundle scenarios - test_installer.py: 2 unit tests for _stale_stub_diagnostic() Output template cleanup: - Remove reason_code column from all 6 develop output templates (ZH+EN success/partial/quick-fix). reason_code is an internal verification field, not user-facing information. - output-contract.md: clarify reason_code is internal-only - Partial template: rename reason_code+root_cause columns to human-readable "阻塞原因"/"Block reason" + "根因分类"/"Root cause" - golden-snapshots.json: update 4 affected hashes
Li-Sanze
added a commit
that referenced
this pull request
May 28, 2026
- blueprint/tasks.md: mark stale stub diagnostics partial done (PR #49), add renderer scope audit backlog - blueprint/README.md: update latest archive pointer - sopify.json: bump bundle_version to 2026-05-27.220559 - CHANGELOG, README badges, header templates: version sync - golden-snapshots.json: updated 6 header + 2 copilot payload hashes
Li-Sanze
added a commit
that referenced
this pull request
May 28, 2026
- blueprint/tasks.md: mark stale stub diagnostics partial done (PR #49), add renderer scope audit backlog - blueprint/README.md: update latest archive pointer - sopify.json: bump bundle_version to 2026-05-27.220559 - CHANGELOG, README badges, header templates: version sync to 2026-05-28.044501 - golden-snapshots.json: updated 6 header + 2 copilot payload hashes
Li-Sanze
added a commit
that referenced
this pull request
May 28, 2026
- blueprint/tasks.md: mark stale stub diagnostics partial done (PR #49), add renderer scope audit backlog - blueprint/README.md: update latest archive pointer - sopify.json: bump bundle_version to 2026-05-27.220559 - CHANGELOG, README badges, header templates: version sync to 2026-05-28.044700 - golden-snapshots.json: updated 6 header + 2 copilot payload hashes
Li-Sanze
added a commit
that referenced
this pull request
May 28, 2026
- blueprint/tasks.md: mark stale stub diagnostics partial done (PR #49), add renderer scope audit backlog - blueprint/README.md: update latest archive pointer - sopify.json: bump bundle_version to 2026-05-27.220559 - CHANGELOG, README badges, header templates: version sync to 2026-05-28.044700 - golden-snapshots.json: updated 6 header + 2 copilot payload hashes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two independent fixes in one branch:
1. Stale stub diagnostics (DX improvement)
When a workspace stub references an old
bundle_versionthat no longer exists in the installed payload, error messages were misleading — they said "refresh payload" when the real problem was a stale workspace stub.Changes:
installer/bootstrap_workspace.py: added_stale_stub_diagnostic()helper that comparesrequested_versionvsactive_versionfrom payload manifestinstaller/inspection.py:_workspace_bundle_recommendation()now prefers enriched message forGLOBAL_BUNDLE_MISSINGruntime/gate_output.py: neutral hint covering both stale stub and genuinely missing bundle scenarios_stale_stub_diagnostic2. Remove reason_code from user-facing output templates
reason_codeis an internal machine verification field. It was leaking into user-facing develop output templates (success/partial/quick-fix) as a raw column.Changes:
reason_codecolumnoutput-contract.md(ZH + EN): clarified reason_code is internal-onlydevelop-rules.md(ZH + EN): added one-line constraint in §2.2 supplementary notesTests
640 passed, 17 deselected, 31 subtests passed