Repository navigation
Run the AnalysisRepository conformance suite against the C# host - #597
Draft
hahn-kev-bot wants to merge 2 commits into
Draft
hahn-kev-bot wants to merge 2 commits into
hahn-kev-bot wants to merge 2 commits into
Conversation
The host serves its repository as one command per method, under interlinearizer.repository, and takes --papi-port so a test can stand up a network of its own. A fake PAPI server in Jest starts the published host, accepts its registrations, and sends it the suite's commands, so `npm run test:c-sharp:conformance` needs no Platform.Bible. CSharpRepository is the TypeScript side of the seam. The C# repository gains ReadAll and CountApprovals, the latter with the approval tie-break the WebView uses. The host's serializer drops null fields, as the seam promises absent optional fields. The suite's record ids are GUIDs, distinct across record kinds, since Harmony keeps every entity in one table. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Harmony keeps every entity in one table, so a second create under an id already created, of whatever kind, is dropped without error. An apply now refuses an id named in more than one kind of its change set, or put under an id stored as another kind, applying nothing, rather than losing the record. A test pins Harmony's behavior beside the two refusals. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI summary
Summary
The
AnalysisRepositoryconformance suite's required group now runs against the C# host, with no Platform.Bible in the loop.sequenceDiagram participant Jest as Jest (conformance suite) participant Adapter as CSharpRepository participant Fake as FakePapi (ws server) participant Host as InterlinearizerHost.exe Jest->>Fake: start(dataDir) Fake->>Host: spawn --papi-port <free> --data-dir Host->>Fake: network:registerMethod ×17 Fake-->>Host: true Host-->>Fake: "Interlinearizer host ready" Jest->>Adapter: apply / lookups Adapter->>Fake: command:interlinearizer.repository.<method> {projectId, ...} Fake->>Host: JSON-RPC request Host-->>Fake: result (nulls dropped) Fake-->>Adapter: resultWhat each side gained:
The second commit guards a Harmony behavior the suite tripped over: entities of every kind share one table, so a second create under an existing id is dropped without error.
Applynow refuses an id named in more than one kind, or put under an id stored as another kind.Evidence
HarmonyKeepsOneEntityPerIdWhateverItsKindshows the loss: two creates under one id in oneAddChangesleave one phrase analysis and no phrase link. The two refusal tests failed withExpected to throw ArgumentException.After:
npm run test:dotnet→ 115 passed.npm run test:c-sharp:conformance→ 35 passed against the published host.npm run test:coverage→ 6520 passed, the adapter at 100%.Merge Danger
Door: two-way
Nothing exposes the repository commands to the WebView yet; the adapter is only reached from the new Jest harness.
Blast Radius: CI
The e2e job gains a step that runs the conformance suite after publishing the host. The suite's fixture ids changed for every implementation, but the DraftRepository and Pt9ImportRepository runs still pass.
Test plan
npm run build:c-sharp -- <rid>thennpm run test:c-sharp:conformanceon a second platform🤖 Generated with Claude Code
This change is