@happyvertical/smrt-ingestion 0.55.6 → 0.55.7
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/AGENTS.md +11 -3
- package/FEEDBACK.md +117 -0
- package/README.md +11 -0
- package/REVIEW.md +136 -0
- package/dist/chunks/{execution-C6HJvl9e.js → execution-CYjtj9_l.js} +375 -11
- package/dist/chunks/execution-CYjtj9_l.js.map +1 -0
- package/dist/chunks/execution-internal-DWteDHM2.js.map +1 -1
- package/dist/chunks/feedback-B_NILilH.js +577 -0
- package/dist/chunks/feedback-B_NILilH.js.map +1 -0
- package/dist/chunks/{extraction-bseWZuWN.js → proposal-errors-z24VKWnQ.js} +10 -2
- package/dist/chunks/proposal-errors-z24VKWnQ.js.map +1 -0
- package/dist/dto.d.ts +2 -0
- package/dist/dto.d.ts.map +1 -1
- package/dist/execution-internal.d.ts +3 -1
- package/dist/execution-internal.d.ts.map +1 -1
- package/dist/execution.d.ts +15 -1
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +1 -1
- package/dist/feedback-contracts.d.ts +40 -0
- package/dist/feedback-contracts.d.ts.map +1 -0
- package/dist/feedback-dto.d.ts +100 -0
- package/dist/feedback-dto.d.ts.map +1 -0
- package/dist/feedback-internal.d.ts +19 -0
- package/dist/feedback-internal.d.ts.map +1 -0
- package/dist/feedback.d.ts +53 -0
- package/dist/feedback.d.ts.map +1 -0
- package/dist/manifest.json +13 -1
- package/dist/models.js +1 -1
- package/dist/models.js.map +1 -1
- package/dist/proposal-contracts.d.ts +4 -0
- package/dist/proposal-contracts.d.ts.map +1 -1
- package/dist/proposal-dto.d.ts +4 -0
- package/dist/proposal-dto.d.ts.map +1 -1
- package/dist/proposal-errors.d.ts +5 -0
- package/dist/proposal-errors.d.ts.map +1 -0
- package/dist/proposal-sdk.d.ts.map +1 -1
- package/dist/proposals.d.ts +4 -1
- package/dist/proposals.d.ts.map +1 -1
- package/dist/proposals.js +114 -15
- package/dist/proposals.js.map +1 -1
- package/dist/review-dto.d.ts +115 -0
- package/dist/review-dto.d.ts.map +1 -0
- package/dist/server.d.ts +24 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +146 -54
- package/dist/server.js.map +1 -1
- package/dist/smrt-knowledge.json +73 -14
- package/dist/svelte/components/ActionReview.svelte +232 -0
- package/dist/svelte/components/ActionReview.svelte.d.ts +15 -0
- package/dist/svelte/components/ActionReview.svelte.d.ts.map +1 -0
- package/dist/svelte/components/EvidenceViewer.svelte +31 -0
- package/dist/svelte/components/EvidenceViewer.svelte.d.ts +8 -0
- package/dist/svelte/components/EvidenceViewer.svelte.d.ts.map +1 -0
- package/dist/svelte/components/InboxView.svelte +119 -0
- package/dist/svelte/components/InboxView.svelte.d.ts +9 -0
- package/dist/svelte/components/InboxView.svelte.d.ts.map +1 -0
- package/dist/svelte/components/IntakeInbox.svelte +11 -0
- package/dist/svelte/components/IntakeInbox.svelte.d.ts +10 -0
- package/dist/svelte/components/IntakeInbox.svelte.d.ts.map +1 -0
- package/dist/svelte/components/IntakeReview.svelte +11 -0
- package/dist/svelte/components/IntakeReview.svelte.d.ts +10 -0
- package/dist/svelte/components/IntakeReview.svelte.d.ts.map +1 -0
- package/dist/svelte/components/ReviewView.svelte +243 -0
- package/dist/svelte/components/ReviewView.svelte.d.ts +9 -0
- package/dist/svelte/components/ReviewView.svelte.d.ts.map +1 -0
- package/dist/svelte/i18n.d.ts +72 -0
- package/dist/svelte/i18n.d.ts.map +1 -0
- package/dist/svelte/i18n.js +72 -0
- package/dist/svelte/index.d.ts +5 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +3 -0
- package/dist/svelte/view-utils.d.ts +13 -0
- package/dist/svelte/view-utils.d.ts.map +1 -0
- package/dist/svelte/view-utils.js +96 -0
- package/package.json +46 -21
- package/dist/chunks/execution-C6HJvl9e.js.map +0 -1
- package/dist/chunks/extraction-bseWZuWN.js.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -27,9 +27,17 @@ submission never run inside ingestion database transactions.
|
|
|
27
27
|
|
|
28
28
|
Validation: `pnpm test`, `pnpm test:postgres`, `pnpm test:providers`, `pnpm typecheck`, `pnpm build`.
|
|
29
29
|
The PostgreSQL command provisions a real database and fails if unavailable.
|
|
30
|
+
Fixture teardown uses `src/test-support/postgres-cleanup.ts`: only owned
|
|
31
|
+
exec_/ing_/ext_/sources_ names, normal DROP, bounded 55006-only retry. Never
|
|
32
|
+
force-terminate backends, grant signal privileges, or ignore leaked sessions.
|
|
30
33
|
Build includes browser import validation. The provider lane exercises local SDK
|
|
31
34
|
adapters and process isolation, without claiming live remote recognition quality.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
`src/svelte` owns transport-neutral review components and browser-safe host callbacks.
|
|
36
|
+
See [FEEDBACK.md](FEEDBACK.md) for revision-bound explicit feedback, scoped example retrieval,
|
|
37
|
+
provider-boundary revalidation and authorized routing policy adoption.
|
|
38
|
+
See [REVIEW.md](REVIEW.md) for authenticated hosts, bounded saved-review reloads,
|
|
39
|
+
assignment ownership, logical split re-extraction and the maintained browser proof.
|
|
40
|
+
UI validation additionally requires `pnpm test:components` and `pnpm test:e2e`;
|
|
41
|
+
`typecheck` includes Svelte and `build` includes the types-first `/svelte` entry.
|
|
42
|
+
The evaluation command remains reserved for #3677 and fails explicitly.
|
|
35
43
|
See ../../docs/test-matrix/3670-ingestion-foundation.md for behavior coverage.
|
package/FEEDBACK.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Explicit ingestion feedback
|
|
2
|
+
|
|
3
|
+
Configure `IngestionOptions.feedback` to opt in. The existing `intake_feedback`
|
|
4
|
+
ledger owns these records; no new schema, embedding service or provider is added.
|
|
5
|
+
`FeedbackConfiguration` sets a version, maximum examples, scan count, serialized
|
|
6
|
+
bytes and lexical similarity threshold, plus a live scoped authorization callback.
|
|
7
|
+
Hard ceilings are 20 examples, 1,000 scanned records and 1 MB. Choose substantially
|
|
8
|
+
smaller application limits. The proposal's complete serialized request, including
|
|
9
|
+
examples, must also fit the current minimum application/source/provider budget.
|
|
10
|
+
|
|
11
|
+
`recordFeedback` accepts the exact displayed action revision, review version and
|
|
12
|
+
binding hash, an explicit correct/incorrect judgment, optional reason text and a
|
|
13
|
+
request ID. The server resolves reviewer, tenant/confidential scope, retained
|
|
14
|
+
source evidence, extraction/generation versions and current handler arguments.
|
|
15
|
+
A replay returns the same immutable receipt; changed payloads conflict.
|
|
16
|
+
`supersedesId` appends a replacement for the specified prior interpretation
|
|
17
|
+
judgment. A second successor conflicts. Revised actions make old bindings
|
|
18
|
+
ineligible. Approval and successful execution never imply that extracted fields
|
|
19
|
+
are correct.
|
|
20
|
+
|
|
21
|
+
Decision and downstream execution facts are captured inside their owning
|
|
22
|
+
transaction, keyed by immutable event ID and signal, when the configured capture
|
|
23
|
+
authority allows the optional memory projection and it fits the configured byte
|
|
24
|
+
cap. Denial or an oversized automatic projection leaves the underlying
|
|
25
|
+
authoritative decision/outcome intact, including failure and reconciliation.
|
|
26
|
+
Explicit `recordFeedback` and `observeFeedback` requests still reject invalid or
|
|
27
|
+
oversized writes; actual database failures still propagate and roll back. Failed/rolled-back domain
|
|
28
|
+
work and unknown external outcomes remain distinct. `observeFeedback` can replay
|
|
29
|
+
an authorized existing event; it cannot supply a correctness label or fabricate
|
|
30
|
+
an execution result. An initial denial does not mutate retention. Once authorized,
|
|
31
|
+
a narrowed privacy ceiling survives business rollback and later revocation.
|
|
32
|
+
|
|
33
|
+
## Retrieval and provider boundaries
|
|
34
|
+
|
|
35
|
+
`retrieveFeedback({ itemId, query })` derives the current offered catalog,
|
|
36
|
+
candidates and model/prompt/configuration versions on the server. Callers cannot
|
|
37
|
+
provide candidate authority. The deterministic matcher uses lowercase Unicode
|
|
38
|
+
word-set Jaccard similarity (minimum 0.2), then immutable record ID for ties.
|
|
39
|
+
Scanning, recursive provenance checks and returned examples are bounded; a limited scan does not promise an
|
|
40
|
+
exhaustive history search. Both positive and negative explicit examples are kept.
|
|
41
|
+
|
|
42
|
+
Every selected source must still be readable in the same tenant and confidential
|
|
43
|
+
scope, with its current action/analysis binding, target grants, handler version,
|
|
44
|
+
model/prompt/configuration compatibility and retention. Each source's current
|
|
45
|
+
provider policy must allow the generation recipient and any configured decision
|
|
46
|
+
recipient; the source owner rechecks that policy on both initial and final live
|
|
47
|
+
contexts. Receiving checks cover every offered handler, before and after source
|
|
48
|
+
checks, using each live grant, actual provider recipients and the narrowest byte
|
|
49
|
+
ceiling. Both retrieval and reference revalidation budget the full reconstructed
|
|
50
|
+
examples. A receiving item's provider grant cannot substitute for a source grant.
|
|
51
|
+
Superseded, revoked, deleted or incompatible sources are excluded. Current explicit human corrections
|
|
52
|
+
take precedence: a generation carrying one does not retrieve learned examples.
|
|
53
|
+
|
|
54
|
+
Full examples exist only in the authorized provider request. The SDK proposal
|
|
55
|
+
adapter includes that typed selection in its serialized user message when
|
|
56
|
+
present; disabled feedback leaves the original request shape unchanged. Saved generation
|
|
57
|
+
provenance contains the receiving query, selection configuration digest and
|
|
58
|
+
immutable feedback IDs/digests, not copied source example content. Selected
|
|
59
|
+
references are rechecked before generation, capability probing, decision calls,
|
|
60
|
+
publication and completed-result reads. A newly added example does not invalidate
|
|
61
|
+
an older selection; a revoked or superseded selected example does. Feedback
|
|
62
|
+
lineage is bounded and fails closed. Saved-action reads and pending decisions,
|
|
63
|
+
automatic authorization, preview publication/replay and execution also revalidate
|
|
64
|
+
selected lineage under the
|
|
65
|
+
owning transaction. Revoking, deleting or superseding a selected example blocks
|
|
66
|
+
pending actions; regenerate their proposals and obtain fresh approval to recover.
|
|
67
|
+
A preview replay checks the exact persisted proposal it returns, including its
|
|
68
|
+
analysis attempt; a newer action revision cannot supply replacement lineage.
|
|
69
|
+
Plan replay and final sealed plan-step publication use the same gate.
|
|
70
|
+
For already successful actions, current-authorized durable outcomes remain
|
|
71
|
+
readable/replayable, but invalid learned lineage suppresses saved proposal
|
|
72
|
+
display, arguments and plan payload. An empty selection carries no learned source
|
|
73
|
+
and does not turn optional feedback-capture denial into action denial. Examples
|
|
74
|
+
never expand the offered catalog, candidate IDs, operation permissions or
|
|
75
|
+
automation eligibility.
|
|
76
|
+
|
|
77
|
+
All durable feedback belongs to the source item's existing retention/redaction
|
|
78
|
+
lifecycle. There is no separate memory store or delayed indexing writer to clean
|
|
79
|
+
up. Hosts using other derived stores still implement the existing `purgeDerived`
|
|
80
|
+
contract. Core `LearningMemory` is intentionally not used here: its success/failure
|
|
81
|
+
reinforcement and default ancestor-scope fallback do not represent separate
|
|
82
|
+
correctness/decision/outcome signals and strict confidential-scope eligibility.
|
|
83
|
+
|
|
84
|
+
## Routing suggestions and adoption
|
|
85
|
+
|
|
86
|
+
`suggestRoutingRule` requires repeated current explicit positive judgments with
|
|
87
|
+
from distinct source items with matching handler/version and arguments, and returns supporting immutable IDs,
|
|
88
|
+
shared query terms and the policy owner's preview/version. Suggestions cannot
|
|
89
|
+
execute or modify policy. `getRoutingRule` rechecks the displayed binding and all
|
|
90
|
+
supporting examples. Arguments are routing preferences, never executable grants.
|
|
91
|
+
|
|
92
|
+
`adoptRoutingRule` requires the exact suggestion digest and expected policy
|
|
93
|
+
version plus current reviewer and adoption authority. The configured policy owner
|
|
94
|
+
must perform its version compare-and-swap and audit on the supplied database
|
|
95
|
+
executor. The ingestion transaction records the exact returned version/audit ID.
|
|
96
|
+
Replays do not adopt twice. Revocation or permission/policy widening rolls back
|
|
97
|
+
both changes. The host callback may store routing preferences only: it must not
|
|
98
|
+
change grants, provider permissions or automation controls. Adoption always
|
|
99
|
+
returns `automaticActionEligible: false`; subsequent proposals retain normal
|
|
100
|
+
current policy and explicit review requirements.
|
|
101
|
+
|
|
102
|
+
## Review UI and evidence
|
|
103
|
+
|
|
104
|
+
The optional `IntakeReviewHost.feedback` callback carries the exact displayed
|
|
105
|
+
revision and binding. Correct/incorrect controls are explicit and independent of
|
|
106
|
+
Approve/Apply. Unsaved argument edits disable correctness controls until the
|
|
107
|
+
displayed binding is current again. Hosts must authenticate that callback and connect it to
|
|
108
|
+
`recordFeedback`; client-supplied reviewer/scope fields are not accepted. The
|
|
109
|
+
maintained browser fixture demonstrates this transport with CSRF protection and
|
|
110
|
+
rejects substituted revisions.
|
|
111
|
+
|
|
112
|
+
See [the behavior matrix](../../docs/test-matrix/3676-ingestion-feedback.md) for
|
|
113
|
+
validation and the frozen learning protocol. The small authored deterministic
|
|
114
|
+
cohort demonstrates contract-level influence, not provider quality or measured
|
|
115
|
+
production improvement. Real-provider evaluation belongs to #3677. There are no
|
|
116
|
+
sampled automatic outcomes in this feature; reporting that stratum as unavailable
|
|
117
|
+
avoids inventing correctness labels from successful jobs.
|
package/README.md
CHANGED
|
@@ -149,3 +149,14 @@ only receipt preservation, never domain writes, AI tools or external actions.
|
|
|
149
149
|
|
|
150
150
|
See [PROPOSALS.md](PROPOSALS.md) for bounded application catalog discovery, durable
|
|
151
151
|
interpretation revisions, optional typed decisions and explicit generated preview.
|
|
152
|
+
|
|
153
|
+
## Human review
|
|
154
|
+
|
|
155
|
+
Mount the `/svelte` inbox and review components through an authenticated host using
|
|
156
|
+
the browser-safe `IntakeReviewHost` DTO contract. See [REVIEW.md](REVIEW.md) for
|
|
157
|
+
exact revision-bound callbacks, live evidence access, logical split corrections,
|
|
158
|
+
assignment ownership, and the maintained upload-to-domain-result browser fixture.
|
|
159
|
+
|
|
160
|
+
Optional explicit feedback and scoped example retrieval are documented in
|
|
161
|
+
[FEEDBACK.md](FEEDBACK.md). Approval and execution outcomes remain separate from
|
|
162
|
+
interpretation correctness; routing policy adoption is explicit and versioned.
|
package/REVIEW.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Authenticated review surfaces
|
|
2
|
+
|
|
3
|
+
`@happyvertical/smrt-ingestion/svelte` exports `IntakeInbox`, `IntakeReview` and
|
|
4
|
+
`EvidenceViewer`. The browser-safe DTO entry exports their `IntakeReviewHost`
|
|
5
|
+
callback contract. Import styling/theme configuration from smrt-ui in the host.
|
|
6
|
+
Components use smrt-ui primitives and the `ingestion.*` i18n catalog.
|
|
7
|
+
|
|
8
|
+
The host authenticates every request, resolves tenant/actor/confidential scope
|
|
9
|
+
from its session, enforces CSRF on mutations, and constructs `IngestionService`.
|
|
10
|
+
Never accept scope, reviewer, permissions or a principal from callback JSON.
|
|
11
|
+
Only supply authorized evidence URLs and escaped text; original URLs are
|
|
12
|
+
same-origin authenticated handlers that recheck `readEvidence` on every read.
|
|
13
|
+
Candidate discovery uses `findCandidates` with current grants. Presentation
|
|
14
|
+
state and disabled buttons provide no server authority.
|
|
15
|
+
|
|
16
|
+
`listReviews(itemId, {cursor?,limit?})` reloads saved action identities and their
|
|
17
|
+
current plan membership without browser storage. It returns at most 50 actions,
|
|
18
|
+
with an opaque action-ID cursor. Every payload requires current item, handler,
|
|
19
|
+
parent plan and target access under the owning transaction. Denied reads fail
|
|
20
|
+
closed. Target reads check current authorization separately from historical
|
|
21
|
+
revision freshness: unfinished drift returns state-only stale reviews without
|
|
22
|
+
removing unrelated entries; succeeded results remain readable after authorized
|
|
23
|
+
target changes. Apply still enforces exact bound target revisions. Expired entries
|
|
24
|
+
contain only review identity/state. Stale entries never disclose old args or target
|
|
25
|
+
labels; an authorized parent plan additionally exposes `stalePlan` identity, key,
|
|
26
|
+
current plan revision and handler identity. Hosts must collect fresh explicit args
|
|
27
|
+
from the reviewer/current authorized evidence and call `previewPlan` with that
|
|
28
|
+
exact plan CAS and the current completed analysis attempt. Action revision is not
|
|
29
|
+
plan revision. Re-expansion preserves action identity and requires fresh approval.
|
|
30
|
+
Success results are rechecked through the durable result reader.
|
|
31
|
+
Plan membership contains the exact parent args/version so edits call
|
|
32
|
+
`previewPlan`, not per-step correction. An item may have more review pages; the
|
|
33
|
+
host must aggregate state across pages when projecting a production inbox state.
|
|
34
|
+
|
|
35
|
+
The host's `load` callback supplies a current `ItemReviewView`, using
|
|
36
|
+
`getCompletedAnalysis` with no historical fallback. Generated suggestions bind
|
|
37
|
+
the **current generation attempt**, not `generation.source.attemptId` (the prior
|
|
38
|
+
extraction). `previewGeneratedProposals` publishes exact reviews and continues to reject stale
|
|
39
|
+
generation candidate pins. When `listReviews` reports `generationStale`, the host
|
|
40
|
+
omits obsolete generation output and renders authorized saved reviews/results.
|
|
41
|
+
Completed saved actions do not hide healthy unprepared suggestions. The saved-binding hint is not
|
|
42
|
+
an authoritative generation-availability check: a fresh human preview can bind a
|
|
43
|
+
current target while the immutable generation still pins its former revision.
|
|
44
|
+
`getCompletedAnalysis` remains strict and throws server-only
|
|
45
|
+
`GenerationSnapshotStaleError` only after every current catalog/provider/candidate
|
|
46
|
+
read is authorized and an immutable candidate revision differs. The maintained
|
|
47
|
+
host catches only that class, reacquires `listReviews` under current owning
|
|
48
|
+
authority, and returns that new page without generation output. It never reuses
|
|
49
|
+
the earlier page after an error. Denials and unknown failures propagate; healthy
|
|
50
|
+
generation still exposes unprepared sibling suggestions. Stale entries expose handler
|
|
51
|
+
and attempt identity only when that attempt is still the current completed/partial
|
|
52
|
+
analysis. An empty-args editor submits fresh explicit human arguments through
|
|
53
|
+
`previewProposal` or `previewPlan` with the saved CAS; it never reuses old generated
|
|
54
|
+
arguments, rewrites the generation snapshot or transfers approval. Analysis-stale
|
|
55
|
+
entries without an attempt require normal reprocessing. Approve,
|
|
56
|
+
reject, defer and correct call `submitDecision`; corrected args create a new
|
|
57
|
+
revision which requires a separate human approval. After an approve/defer/reject
|
|
58
|
+
decision, optional `editAction` calls `previewProposal` with the current action
|
|
59
|
+
revision to publish a new review; completed/executing/unknown actions cannot be
|
|
60
|
+
revised. Local dirty args disable Apply but confer no authority. Plan edits re-expand through
|
|
61
|
+
`previewPlan` with the current **plan** revision. `applyAction` accepts only an
|
|
62
|
+
action ID. Unknown external outcomes require server reconciliation; the UI
|
|
63
|
+
never offers a blind resend. Stable result IDs survive reload and retry.
|
|
64
|
+
|
|
65
|
+
Replace `contextKey` whenever authenticated tenant/session context changes.
|
|
66
|
+
Changing it or itemId destroys the old view and fences late callback results.
|
|
67
|
+
Denied refresh clears prior originals, candidates, arguments and results.
|
|
68
|
+
Missing confidence is unavailable; page/time links exist only for observed
|
|
69
|
+
locations. Provider errors and unresolved/partial results remain review states.
|
|
70
|
+
|
|
71
|
+
## Assignment and logical splits
|
|
72
|
+
|
|
73
|
+
Assignment is explicitly host-owned, durable and versioned. `assign` receives
|
|
74
|
+
an expected assignment version and request ID; the host must authorize the
|
|
75
|
+
manager, constrain eligible assignees, CAS the durable record and reject stale
|
|
76
|
+
writes. Assignment does not grant read, review or execution rights. The maintained
|
|
77
|
+
fixture provisions its own SQLite assignment table before serving requests; no
|
|
78
|
+
production ingestion table or migration is introduced for assignment.
|
|
79
|
+
|
|
80
|
+
`reviseLogicalSplit` authorizes the current generation through the same-executor
|
|
81
|
+
catalog/candidate gate and the existing reviewer grant and policy reviewer list.
|
|
82
|
+
Process access alone cannot mint or replay a human correction; reviewer authority
|
|
83
|
+
is checked before mutation and again before publication. A generation without a
|
|
84
|
+
reviewable catalogue cannot be corrected through this reviewer API.
|
|
85
|
+
It requires all observed pages exactly once, an exact
|
|
86
|
+
current attempt/revision and a request ID. It records the authenticated actor
|
|
87
|
+
and predecessor as a **human correction** in a new immutable extraction
|
|
88
|
+
configuration, queues re-extraction and immediately makes previous suggestions
|
|
89
|
+
and approvals stale. It never changes original bytes/evidence or labels a human
|
|
90
|
+
edit as model output. The host processes the new extraction, then calls
|
|
91
|
+
`prepareGeneration` and the normal fenced interpretation stage. The supported
|
|
92
|
+
immediate-predecessor extraction pin is unchanged. The generator receives a
|
|
93
|
+
human correction only after its digest matches the authoritative source. Ordinary
|
|
94
|
+
`analyze` calls cannot mint an extraction correction; the owning split API is the
|
|
95
|
+
authenticated origin, and forged interpretation corrections fail before provider
|
|
96
|
+
disclosure. If its proposed grouping differs from the correction, suggestions are withheld
|
|
97
|
+
with `human_split_not_respected`. New proposals require new explicit review.
|
|
98
|
+
The reference host runs these stages synchronously for browser determinism;
|
|
99
|
+
production hosts dispatch the existing durable analysis jobs.
|
|
100
|
+
|
|
101
|
+
`feedback` is an optional explicit correctness callback, separate from approval
|
|
102
|
+
choice and execution success. No learning, feedback storage or rule promotion is
|
|
103
|
+
implemented by these components; #3676 owns those services. Do not pass feedback
|
|
104
|
+
or a feedback callback to readers without the relevant host grant.
|
|
105
|
+
|
|
106
|
+
## Maintained browser proof
|
|
107
|
+
|
|
108
|
+
`pnpm test:components` runs real Svelte component tests; `pnpm test:e2e` runs the
|
|
109
|
+
package-local authenticated Vite application under Chromium. The fixture uses
|
|
110
|
+
HttpOnly same-site sessions, CSRF, real SQLite/assets/ingestion/content APIs,
|
|
111
|
+
production unpdf child extraction and a deterministic proposal generator. Its
|
|
112
|
+
hardcoded test login is fixture-only and is never a production auth provider.
|
|
113
|
+
Image/audio originals remain inspectable when no OCR/speech provider is
|
|
114
|
+
configured; the suite makes no recognition-quality claim and spends no provider
|
|
115
|
+
budget. `reference/review-host.ts` is a maintained development fixture, not a
|
|
116
|
+
published server entry. Browser tests show actual approved args and persisted
|
|
117
|
+
ContentDocument results, stale tabs, reload, retries and negative access.
|
|
118
|
+
|
|
119
|
+
Run full package `test`, `test:postgres`, `test:providers`, `build`, `typecheck`,
|
|
120
|
+
`test:components`, `test:e2e`; use the root Node/pnpm versions. Set a short
|
|
121
|
+
`CI_TEST_TMPDIR`/`TMPDIR`, and optionally
|
|
122
|
+
`PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` to the supported installed Chromium.
|
|
123
|
+
The evaluation lane remains explicitly unavailable until #3677.
|
|
124
|
+
|
|
125
|
+
The existing CI browser job includes ingestion changes and shared UI primitive
|
|
126
|
+
changes in affected mode, and runs the ingestion browser suite in full mode. Its
|
|
127
|
+
normal dependency build precedes the suite and failed runs upload browser evidence.
|
|
128
|
+
|
|
129
|
+
The maintained host derives inbox state by traversing bounded public review pages,
|
|
130
|
+
authorizing every action/parent/target before classification. It retains only
|
|
131
|
+
scalar totals and the requested page; an off-page denial denies the whole view.
|
|
132
|
+
The component's Load more and subsequent refresh/mutation reload every displayed
|
|
133
|
+
page using fresh cursors, then publish the combined authorized set together. Old
|
|
134
|
+
page payloads are cleared while loading; any unavailable page clears all payloads.
|
|
135
|
+
This keeps plan controls and earlier steps visible across page boundaries without
|
|
136
|
+
reusing a prior authorization decision.
|