refactor(cli): call isCompatibilityActionable instead of mirroring the rule
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- build-system, cli, tooling
Direzione di ricerca
Start with packages/cli/src/lib/skill-lookup.ts, packages/cli/tsconfig.json, and the CLI tsup.config.ts, then inspect packages/contracts/src/compatibility.test.ts and the existing contract export. Verify the workspace dependency, path resolution, rootDir, and bundling behavior by running the CLI bundler and executing node bin/skillx.js check --target . Done means the artifact agrees with isCompatibilityActionable for all five statuses and pnpm test passes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
packages/cli/src/lib/skill-lookup.ts mirrors the compatibility actionability rule by hand:
export function isActionable(status: string | null | undefined): boolean {
return status === 'declared' || status === 'verified';
}
packages/contracts owns the real rule (isCompatibilityActionable, with the vocabulary in COMPATIBILITY_STATUSES). Two implementations of one rule is exactly the drift the cross-surface parity suite in PR #41 exists to catch — and the CLI is the one surface that suite cannot reach.
Why it was not fixed in PR #41
Making the CLI import @skillx/contracts requires changing how the published artifact is bundled:
packages/cli/tsconfig.jsonsetsrootDir: "./src", so any import outsidesrc/fails typecheck;- tsup treats
dependenciesas external by default, and@skillx/contractsships TypeScript source with no compile step, so it has to go indevDependenciesand be force-bundled (noExternal), together with the tsconfigpathsentry that the bundler needs to resolve it.
Getting that wrong breaks the npm publish path, which release-please triggers automatically on merge to main. That is a poor trade for a one-line predicate.
Mitigation already in place
packages/contracts/src/compatibility.test.ts pins COMPATIBILITY_STATUSES to an explicit list, with a comment naming this mirror. Adding a sixth status now fails that test instead of silently leaving the CLI wrong.
What the fix needs
- Add
@skillx/contractstopackages/clidevDependenciesasworkspace:*. - Add the tsconfig
pathsentry and drop or widenrootDir. - Add
noExternal: ['@skillx/contracts']totsup.config.ts. - Delete the mirrored predicate and delegate to the contract.
- Verify at the artifact level, not just in source: run the CLI bundler, then execute the resulting CLI (
node bin/skillx.js check <slug> --target <runtime>) and confirm the bundle inlined the rule instead of leaving an unresolvable import.
Acceptance
- The shipped CLI reports the same actionable decision as
isCompatibilityActionablefor all five statuses. pnpm teststill passes, and the parity test's note about the CLI limitation can be removed.
- Lingua principale
- TypeScript
- Stelle
- 186
- Fork
- 40
- Merge medio
- 10h 12m
- PR unite (30g)
- 16
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nextlevelbuilder/skillx
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
nextlevelbuilder/skillx#65 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
nextlevelbuilder/skillx#63 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
nextlevelbuilder/skillx#49 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
nextlevelbuilder/skillx#28 ·
I maintainer di solito rispondono entro 1 giorno
-
refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
nextlevelbuilder/skillx#27 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nextlevelbuilder/skillx
Issue simili
-
useFragment does not require `variables` when the fragment's variables type has required fieldsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apollographql/apollo-client#13493 ·
I maintainer di solito rispondono entro 1 giorno
-
Custom hosts written as trailing-dot FQDNs (`host.local.`) aren't detected as local backendsForse già presa @roboomp l’ha presa oggi. Apertabug prio:p2 providers triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
can1357/oh-my-pi#15798 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
code-yeongyu/oh-my-openagent#10172 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
PDFCraftTool/pdfcraft#189 ·
-
Add the Yahoo chart API duplicate last-day row (yfinance#573) to incidents.md (about 1 hour)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertadata docs good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
pacocartones/market-data-sanity-checker#160 ·
I maintainer di solito rispondono entro 1 giorno