chore(ci): flip sync-labels.yml to live mode#47
Merged
Conversation
Per Aaron's 2026-05-26 review of the dry-run output: looked correct, flip the workflow to actually apply .github/labels.yml changes to the live repo. dry-run: true → dry-run: false skip-delete stays false — when a label is removed from .github/labels.yml the workflow will remove it from the live repo too. This is the declarative-config-source-of-truth model documented in LABEL_POLICY.md. Sprint 6 quick-win row marked shipped in SprintPlanning.md. Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CryptoJones
added a commit
that referenced
this pull request
May 26, 2026
…_ptr migration (#51) * ci(codeql): manual c-cpp build replaces autobuild CodeQL's autobuilder has been failing on every PR (including doc-only ones — see #44, #47, #48) with: cpp/autobuilder: Incompatible operating system (expected Windows). cpp/autobuilder: No supported build system detected. The autobuilder scans the repo root for a recognized build file (Makefile, CMakeLists.txt, etc.); the decompiler's Makefile lives at Ghidra/Features/Decompiler/src/decompile/cpp/, so the scan fails and the c-cpp matrix leg goes red even when no C++ source is touched. The actual Java/Kotlin, Actions, and Python legs have always been fine; only c-cpp was affected. Fix: replace the `github/codeql-action/autobuild@v3` step with an explicit `make libdecomp_dbg.a` invocation that cd's into the decompiler tree. libdecomp_dbg.a is the static-archive target that compiles every LIBDECOMP_NAMES source into com_dbg/*.o then `ar qc`s them; it does NOT need BFD at link time (no -lbfd dependency), so binutils-dev / libiberty-dev drop out of the apt-get list too. CodeQL's tracer picks up the .o compile commands during the make invocation, which is exactly the input static analysis needs. The autobuild step stays for the `actions` and `python` matrix legs (it works fine for both — actions is just YAML, python doesn't need a build at all). Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(decompiler): Rec 31 #31-3 RAII Stage 2B — XmlScan::lvalue unique_ptr migration Converts XmlScan's per-token string buffer from a raw owning pointer to unique_ptr<string>. This eliminates 7 raw `new string()` allocation sites (one per scan* mode helper) and the manual `delete` in ~XmlScan / clearlvalue, replacing them with make_unique + the unique_ptr destructor's automatic cleanup. The single ownership-transfer point (lval(), called by bison's yylex to hand the string up to the parser value stack) uses unique_ptr::release() so the bison side's existing raw-pointer ownership convention is unchanged. Before: class XmlScan { string *lvalue; // raw owning pointer ... string *lval(void) { string *ret = lvalue; lvalue = (string *)0; // manual null-out return ret; } void clearlvalue(void) { if (lvalue != (string *)0) // manual null-check delete lvalue; // manual delete } }; // Allocate (×7 across scan* helpers): lvalue = new string(); After: class XmlScan { unique_ptr<string> lvalue; // owning RAII handle ... string *lval(void) { return lvalue.release(); // ownership transfer; lvalue → nullptr } void clearlvalue(void) { lvalue.reset(); // null-safe, automatic delete } }; // Allocate (×7): lvalue = make_unique<string>(); Bison sync: xml.y is the grammar source; xml.cc is the generated parser. The edits are entirely in the epilogue / prologue %{...%} regions that bison copies verbatim, so both files get the identical hand-edit and stay in lockstep without invoking bison. The repo's xml.cc was generated by bison 3.0.4; the local box has 3.8.2 and a clean regeneration would produce huge unrelated diff — keeping the parallel hand-edit avoids that. xml.hh picks up <memory> and the make_unique / move / unique_ptr usings alongside the existing std:: aliases. Scope intentionally limited: - Semantic-action raw `new`s (xml.y:150, 153, 198, 200, 208 and the parallel sites in xml.cc's yyparse) are NOT touched in this PR. They live inside bison's table-driven yyparse and a clean migration requires actual bison-3.0.4 regeneration; that's a separate follow-up PR (Stage 2C). - The big-object epilogue raw new's (line 525 `new XmlScan`, line 538 `new Element`, line 624 `new Document`) require API redesign across xml.hh + callers and are separate PRs of their own. - cppRaiiAudit's PROTECTED_FILES does NOT yet include xml.cc / xml.hh / xml.y — adding them now would fail the gate on the still-present semantic-action raw new's. Add after Stage 2C lands. Tests: this is functionally a no-op refactor. The behavior change is "manual delete replaced by unique_ptr destructor"; both forms free the string on exactly the same code paths. Marshal RAII Stage 2A (PR #46) had the same shape and passed C++ unit tests + ASan + UBSan. Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Per Aaron's 2026-05-26 review of the dry-run output: looked correct, flip the workflow to actually apply
.github/labels.ymlchanges to the live repo.skip-deletestaysfalse— when a label is removed from.github/labels.ymlthe workflow will remove it from the live repo too. This is the declarative-config-source-of-truth model documented inLABEL_POLICY.md.Sprint 6 quick-win row marked shipped in
SprintPlanning.md.Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/