feat(tooling): feed recorded drafting misses back into every issue draft as a pre-publish checklist - #8150
Merged
Merged
Conversation
…aft as a pre-publish checklist (#8118) Every draft was independent -- the tool had no memory of past post-merge gaps, the exact failure mode the maintainer named as the bottleneck. Now a real gap, once found, is recorded manually via scripts/record-drafting-miss.ts (appends to scripts/drafting-misses.json -- a plain committed file, no new database) and draftIssueBody applies the accumulated lessons on EVERY subsequent draft: a checklist section grouped per category (repeats counted, most recent lesson wording wins), under the same resolve-then-DELETE contract as the UNGROUNDED markers so it can never survive publishing. parseDraftingMisses is deliberately fail-loud -- silently dropping a malformed lesson would defeat the loop -- and the recorder re-validates the whole file through the same parser on every append so a broken hand-edit surfaces at record time, not on the next draft. Still zero auto-detection: a human decides what counts as a miss (#8118's own boundary). 100% line+branch coverage on the extended core.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8150 +/- ##
=======================================
Coverage 92.04% 92.04%
=======================================
Files 765 765
Lines 77638 77668 +30
Branches 23461 23472 +11
=======================================
+ Hits 71463 71493 +30
Misses 5062 5062
Partials 1113 1113
Flags with carried forward coverage won't be shown. Click here to find out more.
|
JSONbored
enabled auto-merge (squash)
July 23, 2026 06:11
JSONbored
disabled auto-merge
July 23, 2026 06:12
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.
Summary
scripts/record-drafting-miss.ts— the cheap, manual recorder: when a real post-merge gap traces back to a drafted issue, one command appends{recordedAt, loosePrompt, missing, category?}toscripts/drafting-misses.json(a plain committed file — the issue's "no new database" boundary). The recorder re-validates the whole file through the core parser on every append, so a broken hand-edit surfaces at record time, not on the next draft.parseDraftingMissesin the core — deliberately fail-loud (contrast the corpus parsers' fail-open posture): silently dropping a malformed lesson would defeat the loop.draftIssueBodynow applies accumulated misses on every draft: a "Pre-publish checklist" section grouped per category (repeats counted, most-recent lesson wording wins, deterministic ordering), under the same resolve-then-DELETE contract as the UNGROUNDED markers so it can never survive publishing.scripts/draft-issue.tsauto-picks up the default file when it exists;--missesoverrides, and an explicit path that doesn't exist fails loudly instead of silently drafting without the checklist.Closes #8118
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm run test:ciran green end-to-end on this branch (includes every box above). The extended core keeps 100% line AND branch coverage (31 tests, scoped v8 report: 87/87 branches).record-drafting-miss.tsis thin IO glue under the established scripts exemption; its validation logic lives in the tested core parser.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.The misses file is maintainer-authored content in the public repo — the recorder is manual by design, so nothing sensitive can enter it without a human typing it there.
UI Evidence
Not applicable — no UI change.
Notes
scripts/drafting-misses.jsonis seeded — the checklist section only appears once a real miss is recorded, so drafts stay unchanged until the loop has actual lessons.