Say what the core/ and scripts/ deprecations actually mean - #3749
dbernstein wants to merge 1 commit into
Conversation
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>
|
Claude finished @dbernstein's task in 1m 51s —— View job Claude Code Review
SummaryDocumentation-only, and the substantive claims hold up against the tree: DetailsMinor:
|
|
| - `/scripts` - Legacy CLI utilities (**deprecated - no new code**) | ||
| - `/scripts` - Legacy CLI utilities (**deprecated - put new logic in `/celery/tasks`**) | ||
| - The package is deprecated for *logic*, not for entry points. A thin `Script` subclass | ||
| here plus a `bin/` wrapper is still the only supported way to run something on demand, |
There was a problem hiding this comment.
On-demand CLI claim is overbroad
“The only supported way to run something on demand” overlooks bin/customlist_import and bin/customlist_export, which invoke their dedicated implementations directly without a Script subclass or Celery dispatch. This wording could prompt the same unnecessary migration requests this clarification aims to prevent. Describe this as a supported general-purpose pattern, or explicitly preserve the specialized custom-list CLI exception.
| here plus a `bin/` wrapper is still the only supported way to run something on demand, | |
| here plus a `bin/` wrapper is still a supported way to run something on demand, |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
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