Say what the core/ and scripts/ deprecations actually mean - #3749
dbernstein wants to merge 3 commits into
Conversation
|
Claude finished @dbernstein's task in 1m 37s —— View job SummaryI checked each factual claim against the tree and they all hold. DetailsMinor:
|
|
57897c5 to
df2bf6e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3749 +/- ##
=======================================
Coverage 93.72% 93.72%
=======================================
Files 510 510
Lines 46510 46510
Branches 6313 6313
=======================================
Hits 43590 43590
Misses 1886 1886
Partials 1034 1034 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Review on #3749 caught two places where the new wording sends a reader somewhere the thing is not. "A thin Script subclass *here*" reads as /scripts only, but nine modules define integration-local Script subclasses next to the integration they drive -- bibliotheca, boundless, overdrive, the five opds variants, and discovery/registration_script. Left as written it makes those look misplaced and would push a new vendor script into /scripts, which is the opposite of what this change is for. The BISAC code table is not in /core/classifier either. bisac.py:261 loads it from /resources/classifier via classifier_resources_dir(), alongside dewey_1000.json and lcc_one_level.json. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both markers were written as "deprecated - no new code" when CLAUDE.md was first added in 21df3c5. Read literally, neither is true, and reviewers acting on the literal reading keep asking for moves that have nowhere to go. `scripts/` has no replacement. `[project.scripts]` holds exactly one entry and it resolves into that package; there is no cli/ package, click app or `palace` command; and of the ~74 wrappers in bin/, 50 import palace.manager.scripts directly and 16 more subclass Script through the integration packages. Five new Script subclasses and five new bin/ wrappers have landed since the marker was written. What the deprecation is actually protecting is business logic, which now goes in celery/tasks/ with a thin dispatcher here. `core/` is genuinely being drained -- net -2,001 lines over the last year, as coverage providers, monitors and facets came out. But `core/classifier/` is net +131 over the same period and is the only part still taking behaviour changes. Nothing outside it defines classification logic, and there is no candidate home: packages/ holds only palace-opds and palace-util, and service/ is DI wiring. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Review on #3749 caught two places where the new wording sends a reader somewhere the thing is not. "A thin Script subclass *here*" reads as /scripts only, but nine modules define integration-local Script subclasses next to the integration they drive -- bibliotheca, boundless, overdrive, the five opds variants, and discovery/registration_script. Left as written it makes those look misplaced and would push a new vendor script into /scripts, which is the opposite of what this change is for. The BISAC code table is not in /core/classifier either. bisac.py:261 loads it from /resources/classifier via classifier_resources_dir(), alongside dewey_1000.json and lcc_one_level.json. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
4e9fba6 to
35e3f3f
Compare
Description
Replaces the bare deprecated - no new code markers on
/coreand/scriptsinCLAUDE.mdwith what the deprecations actually mean.Documentation only. No code changes.
Motivation and Context
Both markers arrived together in
21df3c5d9(2026-03-16), the commit that created the Claude Code config files. They were written as scaffolding rather than as separately-argued policy, and read literally neither is accurate. AI reviewers act on the literal reading and ask for moves that have nowhere to go — this has now fired on three consecutive PRs (#3726, #3736, #3737), each time citingCLAUDE.mdas the authority and each time asking to "move this to the supported framework."/scripts— there is no replacement framework[project.scripts]entriespalace-startup-task = "palace.manager.scripts.startup:create_startup_task"— it resolves into the deprecated packagecli/package, click/typer app,palacecommandbin/wrappers importingpalace.manager.scriptsdirectlyScript/CollectionInputScript/InputScriptpalace.manager.customlists, a purpose-built argparse CLI for custom-list import/exportscripts/base.pyalso importsTimestampDatafrompalace.manager.core.monitor, so the deprecated CLI framework is built on the deprecated core package.The rule is not being followed either, which is the clearest evidence it is mis-stated. Since 2026-03-16 five new
Scriptsubclasses have landed —UpdateExpiredLicensesScript,OverdriveReaperScript,ReclassifyNullAudienceWorksScript,CustomListEntriesSweepScript,ResetNonBisacNonfictionSubjectsScript— along with five newbin/wrappers.The startup-task framework is not a substitute: it runs once per deployment and has no on-demand path. The repo treats the two as complementary and ships them together —
9c626b229added a startup task, aScriptand abin/wrapper in one commit for the null-audience repair.What the deprecation is really protecting is business logic, and that convention is being followed: the logic lives in
/celery/tasks, and the class here is a few lines that call.delay(). The wording now says that./core— true in general, false for the classifiercore/excluding the classifier is net −2,001 lines over the last 12 months. It is actively being drained:7a3274ea1core/coverage.py, −1,364 (CoverageProvider machinery, PP-4468)963b651b2core/monitor.py, −23049bc00071core/equivalents_coverage.py−201,core/query/coverage.py−5817b873e4dcore/facets.py, −168core/classifier/over the same period is net +131, and is the only part ofcore/still receiving behaviour changes (7d5b8a06a,ff2432b7e, and the PP-4849 work). There is no candidate home for it:packages/contains onlypalace-opdsandpalace-util, neither with any classification code, andpalace/manager/service/is dependency-injection wiring. 23 modules across the tree import frompalace.manager.core.classifier; all are consumers.So the general rule stands and the exception is now stated, rather than left for each reviewer to rediscover.
How Has This Been Tested?
Documentation only — no code paths touched.
pre-commit run --files CLAUDE.mdpasses, including PyMarkdown.Checklist
🤖 Generated with Claude Code