Repository navigation
refactor(native): read dispatch symbol fallbacks as lenient name facts at the port - #10889
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The reviewed changes appear safe to merge; no blocking issue was found. SummaryNative inventory readers now use shared operation facts instead of their own row checks.
No actionable correctness or security issues were found. This review was source-based; tests were not run. Whether another PR supersedes this one could not be confirmed because GitHub access was unavailable. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
Reader[Native inventory reader] --> Port[executeFact]
Port --> Execute[Port execute]
Execute --> Reply[Provider execution]
Reply --> Contract[Named fact contract]
Contract -->|Valid| Fact[Typed rows]
Contract -->|Invalid| Error[Error with partial Evidence]
Reply --> Source[Unchanged source Evidence]
Fact --> Projection[Reader-specific result]
Reviews (4) · Last reviewed commit: "refactor(native): read literal searches ..." · Reviewed by Greptile |
2f49d21 to
c6340b4
Compare
…ion facts (#10894) * refactor(native): read literal searches and overview counts as operation facts * refactor(native): read addressed inventory rows as operation facts in every reader (#10899) * refactor(native): read addressed inventory rows as operation facts in every reader * test(native): cover xrefs name resolution through the name fact contract * test(server): pin procedure completion to the procedure inventory contract
9fc5be1 to
cd2d9ce
Compare
…s at the port (#10889) * refactor(native): read dispatch symbol fallbacks as lenient name facts at the port * test(native): accept undeclared name-row fields in both dispatch consumers * refactor(native): read literal searches and overview counts as operation facts (#10894) * refactor(native): read literal searches and overview counts as operation facts * refactor(native): read addressed inventory rows as operation facts in every reader (#10899) * refactor(native): read addressed inventory rows as operation facts in every reader * test(native): cover xrefs name resolution through the name fact contract * test(server): pin procedure completion to the procedure inventory contract
… fact contracts (#10883) * refactor(native): read retained inventory views through the operation fact contracts * refactor(native): read matching inventories through the operation fact contracts (#10887) * refactor(native): read dispatch symbol fallbacks as lenient name facts at the port (#10889) * refactor(native): read dispatch symbol fallbacks as lenient name facts at the port * test(native): accept undeclared name-row fields in both dispatch consumers * refactor(native): read literal searches and overview counts as operation facts (#10894) * refactor(native): read literal searches and overview counts as operation facts * refactor(native): read addressed inventory rows as operation facts in every reader (#10899) * refactor(native): read addressed inventory rows as operation facts in every reader * test(native): cover xrefs name resolution through the name fact contract * test(server): pin procedure completion to the procedure inventory contract
Summary
Fourth step of ADR
docs/adr/native/typed-operation-facts.md: the native dispatch metadata symbol fallback readslist_namesthroughexecuteFactwith the shared lenient name contract, dropping its private.strict()row schema (ADR decision 2). Stacked on #10887.Problem and expected behavior
NativeDispatchMetadataInspectionparsedlist_nameswithnames.element.strict(), so a provider row carrying an extra field failed this workflow while every other reader accepted it.list_namesexecution as partial Evidence.Change and scope
src/application/native/NativeDispatchMetadataInspection.ts: the fallback callsexecuteFact(analysis, listNamesFact, {}, …); one error path for port and contract failures, both carryingbinary_metadata_failure.dispatchNameInventorySchemais removed. The refusal reason changes from "provider returned an invalid inventory" to the shared "Provider returned an invalid name inventory" and now carriescontract_issuesfield diagnostics.Not included:
EnhancedLiteralTracing(stacked next) and the guard against new local re-parses.Contribution scope: not applicable (internal refactor; the strictness change is the recorded ADR decision).
Contract and boundary impact
listNamesFactandexecuteFact; this reader keeps only the dispatch projection.docs/public/product-catalog.json), package, or installation impact: none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
NativeDispatchMetadataInspection.fallback.test.ts"accepts symbol rows with provider fields the name contract does not name" (a row withprovider_rankwould fail the removed.strict()schema). Existing cases still cover the fallback failure with both refusals and the malformed symbol observation with partial Evidence.EnhancedNativeInvestigation.test.ts: the "undeclared field" rejection case is replaced by "accepts an inventory row with an undeclared provider field in both dispatch consumers" (inspect_native_dispatch_metadata,trace_native_ui_action); the remaining malformed-row cases assert the shared refusal reason..strict()rejects unrecognized keys).For evidence-bearing changes:
Validation performed
npm run test:focused -- src/application/native/NativeDispatchMetadataInspection.fallback.test.ts tests/boundary/providers/native/nativeDispatchFormatFailures.test.ts— 12 passednpm run test:local -- src/application/native/EnhancedNativeInvestigation.test.ts— 43 passednpm run check:fast— passed; pre-commit and pre-push hooks passedCompatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.