Repository navigation
feat(studio): data integrity, storage health, and shared core (plans/217) - #1178
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Blocked merge diagnosis — blocked |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 582 |
| Duplication | 23 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
…ild dks-core before test typechecks The global link regexes are polynomial on adversarial notes; replace them with hand-rolled linear scanners pinned by differential property tests against the reference regexes, make the vitest configs consume dks-core from source so fresh CI checkouts typecheck without a package build, and stop shipping test files in the package build output. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- frontmatter: build mappings as Map + Object.fromEntries so literal __proto__/constructor keys stay plain data (regression test added, verified failing against the old bracket-assignment code) - frontmatter/markdown/okf-export: charAt/.at() accessors and Set.has instead of index-bracket lookups (satisfies strict noUncheckedIndexedAccess and Codacy's no-unnecessary-condition) - backup: Map-based payload lookups (own-property-only, no prototype reads), Uint8Array.from for base64 decode, String() in template - okf-export: drop dead e.content ?? '' (content is non-optional) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
The fs port contract is core; the Node implementation belongs to its only runtime consumer (the dks CLI, landing with the CLI/MCP group). PR1 shipped nodeFsPort/nodeFsWriterPort with test-only consumers, which both violates no-dead-code scoping and exposes node:fs calls to Codacy's syntactic detect-non-literal-fs-filename engine (suppression paths are unavailable: read-scoped API token, standard-enforced pattern — see plans/217 for the full disposition). bundle-load keeps the port-injected logic and its test doubles unchanged. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…omb caps Adversarial review of PR #1178: 0 P1, 3 P2 — all fixed; P3 pins included. - restore the original 41-word stop-word list (the port silently swapped it for a generic 90-word list, inverting searchability and BM25 inputs); discriminating test verified failing against the generic list - parse import-path frontmatter with the yaml package (parseFrontmatterYaml) — parity with the pre-shared-core importer (block scalars, anchors, multi-line values); parity pin test verified failing against the subset parser; subset parser stays the documented zero-dependency fallback - readZip gains optional pre-inflation caps (declared-size checks + inflateRawSync maxOutputLength); bundle-load passes the bundle limits during extraction so hostile zips cannot allocate unbounded memory; three bomb-shaped tests added - merge-entities test comment now states exactly what it pins; encrypted backup gains a hash-before-decrypt order pin; dependency-free doc claims corrected Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
CI's eval run red on the stop-word restoration exposed a second drift: the port had also dropped the length > 2 minimum-token filter and its non-ASCII exception (the generic stop list had been compensating for both). Restoring the rule plus the list makes the shared engine rank the large-corpus fixture identically to main; the snippet-bound fixture returns to main's 'long' query shape (a 1-char query only worked under the missing rule). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Implements the data-integrity and storage-health group of plan 217 (plans/217-open-issues-2026-11-17.md):
navigator.storage.estimate(), persistence status + explicitpersist()request action, graceful unsupported/rejected states, 80% quota warning, local-only diagnostics; e2e coverage.Foundation for #1170: introduces
packages/dks-core, the framework-neutral shared domain services (markdown/OKF parsing, BM25 retrieval, graph path, backup verification, zip) consumed by the PWA behind stable module facades (src/lib/search/retrieval.ts,src/lib/import,src/lib/okf). No behavior change beyond the fixes above; CLI/MCP/CLI-docs consumers land in the following PRs of the plan.Note:
dks-corehas no runtime dependencies beyondyaml; the pnpm upgrade and Node matrix land in the following plan-217 PRs, so this PR stays on the current pinned toolchain.