chore: sync upstream v3.3.6 (ruff pin + COCA hoist) - #222
Merged
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
4 tasks
…ot paths Two release-blocking fixes for v3.3.6: 1. CI ruff pin drift .github/workflows/ci.yml installed ruff==0.15.9 while pyproject.toml [dev] extras and .pre-commit-config.yaml both pin 0.15.14. Ruff's formatter output can change between minor versions, so a contributor running `pip install -e ".[dev]"` and formatting locally with 0.15.14 would produce output the 0.15.9 lint job rejects. Same failure mode that surfaced on PR MemPalace#1579 (2026-05-22). Aligning CI to 0.15.14 keeps the three pin sites in lock-step. 2. COCA filter imports inside per-drawer hot paths PR MemPalace#1605 (COCA content-word filter, shipping in 3.3.6) introduced `from .entity_detector import _get_coca_filter` and `from .palace import _candidate_entity_words` inside _extract_entities_for_metadata (called per drawer) and build_closet_lines (called per closet). Python caches module imports so the runtime cost after the first call is small, but the import machinery still runs Python bytecode every invocation — gemini flagged this on the original PR. Hoisting to module-level removes the per-call import overhead. The hoist is identical to PR MemPalace#1612, which targets develop. Folding it into the release so 3.3.6 doesn't ship the perf regression that 3.3.7 would immediately have to fix. Verification: ruff check + format clean on 0.15.14, full pytest (2258 passed / 12 skipped) on Linux Py 3.9 / 3.11 / 3.13 via `pip install -e ".[dev]"` (CI-matching).
jphein
force-pushed
the
chore/sync-upstream-3.3.6
branch
from
May 26, 2026 13:36
f7922ec to
29f0538
Compare
2 tasks
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
Syncs
techempower-org/mempalace:mainwith upstreamMemPalace/mempalace:mainv3.3.6 release.Three commits brought in:
db1fbe8Merge PR Release v3.3.6 MemPalace/mempalace#1610 release/3.3.6 (tag v3.3.6)a1cf052Merge PR fix(release): align ruff pin to 0.15.14 + hoist COCA imports out of hot paths MemPalace/mempalace#1614 fix/release-3.3.6-ruff-pin-align62a555cfix(release): align ruff pin to 0.15.14 + hoist COCA imports out of hot pathsConflicts resolved
Two files conflicted on the
entity_detectorimport line:mempalace/miner.pymempalace/palace.pyBoth upstream and fork hoisted COCA imports to module level, but the fork additionally imports
_apply_known_systems_prepass(our Tier 3 linguistics cleanup for multi-word compound entities like "Claude Code", "GitHub Copilot"). Resolution keeps both imports — the hot-path concern from upstream is satisfied because both helpers are already at module level, and the fork's compound pre-pass is preserved.Third conflict at
palace.py:364was the call site of_apply_known_systems_prepassitself, kept on the fork side.Test plan
Upstream refs: MemPalace#1610, MemPalace#1614