@lunora/advisor 1.0.0-alpha.101 → 1.0.0-alpha.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/index.d.mts +11 -4
- package/dist/index.d.ts +11 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -79,7 +79,9 @@ for (const finding of findings) {
|
|
|
79
79
|
|
|
80
80
|
### Runtime lints
|
|
81
81
|
|
|
82
|
-
The runtime tier (`hot_shard`, `index_utilization`, `constraint_validator`) reads observed signal off the `LintContext` (`shardTraffic`, `tableScans`, `indexHits`, `tableSamples`). The Studio backend fills
|
|
82
|
+
The runtime tier (`hot_shard`, `index_utilization`, `fan_out_breadth`, `constraint_validator`) reads observed signal off the `LintContext` (`shardTraffic`, `tableScans`, `indexHits`, `tableSamples`). The Studio backend fills `shardTraffic` / `tableScans` / `indexHits` from the shards' admin signal.
|
|
83
|
+
|
|
84
|
+
`tableSamples` has **no shipped feeder**: nothing in the runtime or the Studio reads bounded row samples out of a shard, so `constraint_validator` is a no-op unless _you_ pass samples yourself (the Studio excludes it from the lint set it runs, rather than running it against an input it cannot fill). It is exported and driveable — the sample shape is `AdvisorTableSample` — but wiring it to a deployment means adding a sampling admin read first.
|
|
83
85
|
|
|
84
86
|
```ts
|
|
85
87
|
import { fromServerSchema, runAdvisor } from "@lunora/advisor";
|
package/dist/index.d.mts
CHANGED
|
@@ -2241,10 +2241,11 @@ interface LintContext {
|
|
|
2241
2241
|
storageUploads?: ReadonlyArray<AdvisorStorageUpload>;
|
|
2242
2242
|
/**
|
|
2243
2243
|
* Bounded row samples per table — the `constraint_validator` lint input.
|
|
2244
|
-
*
|
|
2245
|
-
*
|
|
2246
|
-
*
|
|
2247
|
-
*
|
|
2244
|
+
* There is NO shipped feeder: neither the runtime nor the studio reads row
|
|
2245
|
+
* samples out of a shard, so this is absent for every caller in-tree and the
|
|
2246
|
+
* constraint lint finds nothing. Supply it yourself (a paged read per table,
|
|
2247
|
+
* plus the existing-id set for the FK referential-integrity checks) to drive
|
|
2248
|
+
* that lint.
|
|
2248
2249
|
*
|
|
2249
2250
|
* Each entry carries `existingIds` (every `_id` in the sample window) so
|
|
2250
2251
|
* FK columns can be cross-checked across tables in O(1) per value. When
|
|
@@ -2385,6 +2386,12 @@ declare const dedupeCacheKeys: (findings: ReadonlyArray<Finding>) => Finding[];
|
|
|
2385
2386
|
* Constraint validator — flag rows that violate declared FK / NOT NULL / UNIQUE
|
|
2386
2387
|
* constraints by cross-checking sampled row data against the schema.
|
|
2387
2388
|
*
|
|
2389
|
+
* No shipped feeder fills `context.tableSamples` — neither the runtime nor the
|
|
2390
|
+
* Studio reads bounded row samples out of a shard (the Studio drops this lint
|
|
2391
|
+
* from the set it runs for exactly that reason). It runs only for a caller that
|
|
2392
|
+
* gathers samples itself, which is why the guard below returns `[]` rather than
|
|
2393
|
+
* assuming the feed is present.
|
|
2394
|
+
*
|
|
2388
2395
|
* This lint reads the `context.tableSamples` feed (bounded row samples supplied
|
|
2389
2396
|
* by the studio backend via `readTablePage`) and the declared schema. Three
|
|
2390
2397
|
* families of check run over each sample:
|
package/dist/index.d.ts
CHANGED
|
@@ -2241,10 +2241,11 @@ interface LintContext {
|
|
|
2241
2241
|
storageUploads?: ReadonlyArray<AdvisorStorageUpload>;
|
|
2242
2242
|
/**
|
|
2243
2243
|
* Bounded row samples per table — the `constraint_validator` lint input.
|
|
2244
|
-
*
|
|
2245
|
-
*
|
|
2246
|
-
*
|
|
2247
|
-
*
|
|
2244
|
+
* There is NO shipped feeder: neither the runtime nor the studio reads row
|
|
2245
|
+
* samples out of a shard, so this is absent for every caller in-tree and the
|
|
2246
|
+
* constraint lint finds nothing. Supply it yourself (a paged read per table,
|
|
2247
|
+
* plus the existing-id set for the FK referential-integrity checks) to drive
|
|
2248
|
+
* that lint.
|
|
2248
2249
|
*
|
|
2249
2250
|
* Each entry carries `existingIds` (every `_id` in the sample window) so
|
|
2250
2251
|
* FK columns can be cross-checked across tables in O(1) per value. When
|
|
@@ -2385,6 +2386,12 @@ declare const dedupeCacheKeys: (findings: ReadonlyArray<Finding>) => Finding[];
|
|
|
2385
2386
|
* Constraint validator — flag rows that violate declared FK / NOT NULL / UNIQUE
|
|
2386
2387
|
* constraints by cross-checking sampled row data against the schema.
|
|
2387
2388
|
*
|
|
2389
|
+
* No shipped feeder fills `context.tableSamples` — neither the runtime nor the
|
|
2390
|
+
* Studio reads bounded row samples out of a shard (the Studio drops this lint
|
|
2391
|
+
* from the set it runs for exactly that reason). It runs only for a caller that
|
|
2392
|
+
* gathers samples itself, which is why the guard below returns `[]` rather than
|
|
2393
|
+
* assuming the feed is present.
|
|
2394
|
+
*
|
|
2388
2395
|
* This lint reads the `context.tableSamples` feed (bounded row samples supplied
|
|
2389
2396
|
* by the studio backend via `readTablePage`) and the declared schema. Three
|
|
2390
2397
|
* families of check run over each sample:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/advisor",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.103",
|
|
4
4
|
"description": "Schema & query lints (splinter-style advisors) for Lunora, feeding the Studio Advisors view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"advisor",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
50
|
-
"@lunora/server": "1.0.0-alpha.
|
|
49
|
+
"@lunora/errors": "1.0.0-alpha.27",
|
|
50
|
+
"@lunora/server": "1.0.0-alpha.97"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": "^22.15.0 || >=24.11.0"
|