feat: register approved cheat-sheet suggestions into the graph (Workstream F, F5) - #1107
skypank-coder wants to merge 2 commits into
Conversation
…tream F, F5) convert --import wires the ParseResult from suggestions_to_parse_result into the canonical cre_main.register_standard path (one call per results group, mirroring base_parser.register_resource), fail-fast on a group failure. Without --import, convert stays review-only (summary, no DB writes) - the RFC's explicit-approval default. Output uses the repo's cre_logging convention; unknown CREs are still reported. No changes to F1-F4 logic or the schema.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. Summary by CodeRabbit
WalkthroughChangesWorkstream F import flow
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The optional import path preserves review-only behavior by default and passes approved groups to the canonical registration path correctly. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Workstream F, checkpoint F5 — the final F slice
Wires the approved-suggestion conversion into the live import/register path.
Builds directly on F1–F3 (#1024) and F4 (#1033), which are already on main.
What this adds
convertgains an--importflag:links / skipped unknown CREs) and writes nothing to the DB — matching the RFC's
explicit-approval default.
--import: registers the approved subset via the canonicalcre_main.register_standardpath — one call perParseResultresults group,mirroring
base_parser.BaseParser.register_resource.Design choices
register_standard(not the RQ pipeline): this is the canonicalpath for a
ParserInterfaceStandard resource, and a one-shot CLI import shouldcomplete its writes and return a real exit code rather than enqueue async jobs.
the remaining groups with a non-zero exit, matching
base_parser.cre_logging: uses the repo's structured logger (logger.infofor progress,
logger.errorfor failures) — noprint.Scope
F5 only: the register wiring +
--importflag. No changes to F1–F4 logic, thesuggestions schema, the web app, or #963.
Testing
application/tests/cheatsheets_workstream_f_test.py(F1–F5, 29 tests) — F5 mockscre_main.register_standardand stubs the cache, so no live Postgres/Neo4j/Redis/RQis required:
--import,register_standardis never called (write-safe default);--import, one register call per group with the resolved Standard;Verified: full F1–F5 suite green,
black 24.4.2 --checkclean,mypyno new errors.