Repository navigation
Conversation
`resolve_app_identity_skips_probe_for_known_apps` resolved oisy.com and expected `DerivationSource::Known`. oisy.com now publishes its own /.well-known/ii-derivation-origin (`https://oisy.com`), and the app's own declaration deliberately wins over the registry, so it resolves as `Declared` and the test failed on main and on every PR. The test also pinned the over-cap Layer 5 regression on oisy.com serving its SPA shell there, which it no longer does. - The live test now checks three registry apps that still declare nothing (nns.internetcomputer.org, multidex.ai, app.icpswap.com). Each must resolve to its registry derivation origin, unprobed, either via the registry (`Known`) or via its own agreeing declaration (`Declared`), and at least one must still go through the registry. One app adopting the declaration no longer breaks the test. - The over-cap regression gets an offline test, `an_over_cap_layer5_body_reads_as_no_declaration`: a loopback listener serves an oversized page, and `fetch_well_known` must read it as `Absent` under `Overflow::NotTheDocument` and `Unreachable` under `Overflow::Unknown`. - `Overflow::NotTheDocument`'s doc no longer says OISY serves that page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VP2vTJm9ipTPD18xW9HyVG
Draft
6 of 7 tasks
aterga
pushed a commit
that referenced
this pull request
Nov 10, 2026
main now carries #237's fix for the stale oisy.com discover test, so the copy of #238's version this branch carried is dropped in favour of main's discover.rs, and #200's auth.rs changes merge cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VP2vTJm9ipTPD18xW9HyVG
There was a problem hiding this comment.
🟡 Changes recommended
The offline test supplies Overflow::NotTheDocument directly, so it would miss a regression in resolve_declared_origin that restores resolution failures for oversized pages.
1 open issue
What changed in this PR
Updates imcp2-core identity-discovery tests to tolerate known apps publishing derivation-origin declarations, while moving oversized-response regression coverage offline.
Changes:
- Checks three registry apps, accepting matching
KnownorDeclaredresults while requiring at least one registry fallback. - Adds a loopback regression test for both overflow policies.
- Replaces the OISY-specific doc comment with a reference to the offline test.
| File | Description |
|---|---|
crates/imcp2-core/src/discover.rs |
Revises live known-app checks, adds offline overflow coverage, and updates documentation. |
Review effort: Max
This branch has not been deployed
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.

Summary
discover::tests::resolve_app_identity_skips_probe_for_known_appsfails onmainand on every PR withleft: Declared, right: Known, which turns thetestjob red. The code is correct; the test is stale./.well-known/ii-derivation-origin, answering200 text/plainwithhttps://oisy.com.Declaredis correct:resolve_app_identitydeliberately lets an app's own declaration win over the known-app registry.This PR makes the test robust to apps adopting the declaration, and moves the over-cap regression into an offline test.
Related issues
Unblocks CI for #236, which is red only on this test.
Changes
crates/imcp2-core/src/discover.rs, test code and one doc comment only:resolve_app_identity_skips_probe_for_known_apps(live). It now checks three registry apps that today still declare nothing:nns.internetcomputer.org,multidex.aiandapp.icpswap.com.application_is_ic == None).Known(the registry filled the gap) orDeclared(the app's own declaration, which must agree with the registry).Knownpath stays covered. If they all adopt the declaration, the failure message says to add another registry app.an_over_cap_layer5_body_reads_as_no_declaration(new, offline).TcpListenerserves a page larger thanMAX_DERIVATION_ORIGIN_BYTES.Overflow::NotTheDocument,fetch_well_knownmust read it asWellKnown::Absent: the app declares nothing, which is not a failed check.Overflow::Unknown, the same body must read asUnreachable("larger than…").fetch_well_knowndirectly, becauseresolve_app_identity's SSRF guard refuses loopback.Overflow::NotTheDocumentdoc. It no longer claims OISY serves that page, and points to the offline test instead.Testing
Declared; the three apps above resolveKnown.NotTheDocumentis mapped toUnreachable, which is the regression it pins.Checklist:
cargo build --locked --all-targetscargo test --locked --workspace --all-targets: all pass (imcp2lib 82, bin 8, routers 10;imcp2-core217;imcp2-local21).cargo fmt --all/cargo clippy --workspace --all-targets(tree is warning-free)npm test --prefix monitoring/mcp-status(n/a, dashboard untouched)Checklist
Generated by Claude Code