Repository navigation
refactor(registries): url_scheme asks utils/net for local hosts - #4521
Merged
Daniel Meppiel (danielmeppiel) merged 2 commits intoNov 21, 2026
Merged
Daniel Meppiel (danielmeppiel) merged 2 commits into
Daniel Meppiel (danielmeppiel) merged 2 commits into
Conversation
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 21:47
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-h-a2-registry-local-host-owner
branch
from
November 21, 2026 08:25
a17cb8f to
858657f
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The shared URL helper rejects previously accepted noncanonical IPv4 registry URLs, causing manifest parsing failures and silently omitting user/workspace entries without migration documentation or registry-level regression coverage.
1 open issue
What changed in this PR
Consolidates registry URL host classification in utils/net.py, completing the shared-owner refactor from #4304 and #4317.
Changes:
- Delegates registry local-host checks to
is_local_network_host, removing the duplicate RFC 1918 table. - Updates the architecture guard and owner record to require the shared helper.
| File | Description |
|---|---|
src/apm_cli/deps/registry/url_scheme.py |
Delegates local-host classification to the shared network helper. |
scripts/architecture_linter/checks/install_registry_url_scheme.py |
Requires the shared helper import and delegation. |
.apm/architecture/owners/install-deployment.json |
Records the shared helper as the local-host decision owner. |
Review effort: Balanced
registries.<name>.url acceptance now delegates its loopback / RFC 1918 host decision to utils/net.py is_local_network_host (#4317), so one owner classifies local-network hosts. The RFC 1918 edge tests (10.x, 172.16.x, 192.168.x accepted; 172.15.255.255 and 172.32.0.1 refused) stay the oracle. The registry URL scheme guard now requires the delegation. apm-spec-waiver: req-sc-006 behaviour unchanged; host classification moves to its shared owner Co-authored-by: Copilot App <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…4521) Integer, hex and leading-zero forms of 10.0.0.1 were accepted for http:// without insecure: true; the shared owner (utils/net.py is_local_network_host) parses strict literals only, because resolvers read those forms differently. Pin the rejection at the registry level under both manifest contracts and record the change in the CHANGELOG. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-h-a2-registry-local-host-owner
branch
from
November 21, 2026 09:16
858657f to
1d505e5
Compare
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-h-a2-registry-local-host-owner
branch
November 21, 2026 09:50
This was referenced Nov 21, 2026
Merged
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 23, 2026
…C, v0.38 sweep) Stacked on corpus train 6 (51e2e65, main f53aa79). Cars: - policy promise rows in test_policy_promises.py with a control each (scripts deny, self_defined, max_depth, require_resolution, source_attribution, unmanaged_files, fail_on_drift, pinned constraint, explicit includes, transitive MCP trust, content types); the #4826 install refusal is required now that #4853 fixed it on main. - strict known cells for an MCP entry of a runtime no longer targeted (#4784) and a codex hook copy that cannot read its plugin's skill (#2824). - lane C incremental deploy differential (kit from #4849). - v0.38.0 sweep: compile dependency-policy run and preview (#4734), a converged install writes nothing (#4790), hook bundle approval pin (#4688), a registry URL on a local host (#4521). - burndown: a denied local bundle is refused unwritten (#4646), present- provenance-unknown x denied-executable (#4767), audit --ci judges locked content with apm_modules gone, merged-hook entry detection end to end (#4798). Ledger regenerated (baseline 3, known-failing 1, required 2419). Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 23, 2026
…C, v0.38 sweep) Stacked on corpus train 6 (2e8592d, main acb0423). Cars: - policy promise rows in test_policy_promises.py with a control each (scripts deny, self_defined, max_depth, require_resolution, source_attribution, unmanaged_files, fail_on_drift, pinned constraint, explicit includes, transitive MCP trust, content types); the #4826 install refusal is required now that #4853 fixed it on main. - strict known cells for an MCP entry of a runtime no longer targeted (#4784) and a codex hook copy that cannot read its plugin's skill (#2824). - lane C incremental deploy differential (kit from #4849). - v0.38.0 sweep: compile dependency-policy run and preview (#4734), a converged install writes nothing (#4790), hook bundle approval pin (#4688), a registry URL on a local host (#4521). - burndown: a denied local bundle is refused unwritten (#4646), present- provenance-unknown x denied-executable (#4767), audit --ci judges locked content with apm_modules gone, merged-hook entry detection end to end (#4798). Ledger regenerated (baseline 3, known-failing 1, required 2419). Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 23, 2026
…C, v0.38 sweep) Stacked on corpus train 6 (2e8592d) and merged with main fc1866b. Cars: - policy promise rows in test_policy_promises.py with a control each (scripts deny, self_defined, max_depth, require_resolution, source_attribution, unmanaged_files, fail_on_drift, pinned constraint, explicit includes, transitive MCP trust, content types); the #4826 install refusal is required now that #4853 fixed it on main. - an MCP entry of a runtime no longer targeted (#4784) takes main's required row (its fix landed); a strict known cell for a codex hook copy that cannot read its plugin's skill (#2824). - lane C incremental deploy differential (kit from #4849). - v0.38.0 sweep: compile dependency-policy run and preview (#4734), a converged install writes nothing (#4790), hook bundle approval pin (#4688), a registry URL on a local host (#4521). - burndown: a denied local bundle is refused unwritten (#4646), present- provenance-unknown x denied-executable (#4767), audit --ci judges locked content with apm_modules gone, merged-hook entry detection end to end (#4798). Ledger regenerated (baseline 3, known-failing 1, required 2419). Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 23, 2026
…C, v0.38 sweep) Stacked on corpus train 6 (699e837) and merged with main fc1866b. Cars: - policy promise rows in test_policy_promises.py with a control each (scripts deny, self_defined, max_depth, require_resolution, source_attribution, unmanaged_files, fail_on_drift, pinned constraint, explicit includes, transitive MCP trust, content types); the #4826 install refusal is required now that #4853 fixed it on main. - an MCP entry of a runtime no longer targeted (#4784) takes main's required row (its fix landed); a strict known cell for a codex hook copy that cannot read its plugin's skill (#2824). - lane C incremental deploy differential (kit from #4849). - v0.38.0 sweep: compile dependency-policy run and preview (#4734), a converged install writes nothing (#4790), hook bundle approval pin (#4688), a registry URL on a local host (#4521). - burndown: a denied local bundle is refused unwritten (#4646), present- provenance-unknown x denied-executable (#4767), audit --ci judges locked content with apm_modules gone, merged-hook entry detection end to end (#4798). Review folds: I5 admits the compile record only as a regular file and its newly created ancestor directories; run/preview, content-types, plugin-root hook, lane C fresh twin and source-machine bundle identity oracles tightened. Ledger regenerated (baseline 3, known-failing 1, required 2419). Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 23, 2026
…C, v0.38 sweep) Stacked on corpus train 6 (699e837) and merged with main fc1866b. Cars: - policy promise rows in test_policy_promises.py with a control each (scripts deny, self_defined, max_depth, require_resolution, source_attribution, unmanaged_files, fail_on_drift, pinned constraint, explicit includes, transitive MCP trust, content types); the #4826 install refusal is required now that #4853 fixed it on main. - an MCP entry of a runtime no longer targeted (#4784) takes main's required row (its fix landed); a strict known cell for a codex hook copy that cannot read its plugin's skill (#2824). - lane C incremental deploy differential (kit from #4849). - v0.38.0 sweep: compile dependency-policy run and preview (#4734), a converged install writes nothing (#4790), hook bundle approval pin (#4688), a registry URL on a local host (#4521). - burndown: a denied local bundle is refused unwritten (#4646), present- provenance-unknown x denied-executable (#4767), audit --ci judges locked content with apm_modules gone, merged-hook entry detection end to end (#4798). Review folds: I5 admits the compile record only as a regular file and its newly created ancestor directories; run/preview, content-types, plugin-root hook, lane C fresh twin, source-machine bundle identity, self_defined warn and hook bundle update oracles tightened. U-USER-SCOPE-ORG-POLICY removes explicit user-scope cells only: the four scope-free T1 bin x denied-dependency cells are required, witnessed by the project matrix refusals. Ledger regenerated (baseline 3, known-failing 1, required 2423). Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 23, 2026
…C, v0.38 sweep) Stacked on corpus train 6 (699e837) and merged with main fc1866b. Cars: - policy promise rows in test_policy_promises.py with a control each (scripts deny, self_defined, max_depth, require_resolution, source_attribution, unmanaged_files, fail_on_drift, pinned constraint, explicit includes, transitive MCP trust, content types); the #4826 install refusal is required now that #4853 fixed it on main. - an MCP entry of a runtime no longer targeted (#4784) takes main's required row (its fix landed); a strict known cell for a codex hook copy that cannot read its plugin's skill (#2824). - lane C incremental deploy differential (kit from #4849). - v0.38.0 sweep: compile dependency-policy run and preview (#4734), a converged install writes nothing (#4790), hook bundle approval pin (#4688), a registry URL on a local host (#4521). - burndown: a denied local bundle is refused unwritten (#4646), present- provenance-unknown x denied-executable (#4767), audit --ci judges locked content with apm_modules gone, merged-hook entry detection end to end (#4798). Review folds: I5 admits the compile record only as a regular file and its newly created ancestor directories; run/preview, content-types, plugin-root hook, lane C fresh twin, source-machine bundle identity, self_defined warn and hook bundle update oracles tightened; the self_defined warn row is a real warn-mode policy now and is strict known on #5070. U-USER-SCOPE-ORG-POLICY removes explicit user-scope cells only: the four scope-free T1 bin x denied-dependency cells are required, witnessed by the project matrix refusals. Ledger regenerated (baseline 3, known-failing 1, required 2423). Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 23, 2026
…C, v0.38 sweep) Stacked on corpus train 6 (699e837) and merged with main fc1866b. Cars: - policy promise rows in test_policy_promises.py with a control each (scripts deny, self_defined, max_depth, require_resolution, source_attribution, unmanaged_files, fail_on_drift, pinned constraint, explicit includes, transitive MCP trust, content types); the #4826 install refusal is required now that #4853 fixed it on main. - an MCP entry of a runtime no longer targeted (#4784) takes main's required row (its fix landed); a strict known cell for a codex hook copy that cannot read its plugin's skill (#2824). - lane C incremental deploy differential (kit from #4849). - v0.38.0 sweep: compile dependency-policy run and preview (#4734), a converged install writes nothing (#4790), hook bundle approval pin (#4688), a registry URL on a local host (#4521). - burndown: a denied local bundle is refused unwritten (#4646), present- provenance-unknown x denied-executable (#4767), audit --ci judges locked content with apm_modules gone, merged-hook entry detection end to end (#4798). Review folds: I5 admits the compile record only as a regular file and its newly created ancestor directories; run/preview, content-types, plugin-root hook, lane C fresh twin, source-machine bundle identity, self_defined warn and hook bundle update oracles tightened; the self_defined warn row is a real warn-mode policy now and is strict known on #5070; the #4826 refusal row checks rollback. U-USER-SCOPE-ORG-POLICY removes explicit user-scope cells only: the four scope-free T1 bin x denied-dependency cells are required, witnessed by the project matrix refusals. Ledger regenerated (baseline 3, known-failing 1, required 2423). Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 23, 2026
…C, v0.38 sweep) Stacked on corpus train 6 (699e837) and merged with main fc1866b. Cars: - policy promise rows in test_policy_promises.py with a control each (scripts deny, self_defined, max_depth, require_resolution, source_attribution, unmanaged_files, fail_on_drift, pinned constraint, explicit includes, transitive MCP trust, content types); the #4826 install refusal is required now that #4853 fixed it on main. - an MCP entry of a runtime no longer targeted (#4784) takes main's required row (its fix landed); a strict known cell for a codex hook copy that cannot read its plugin's skill (#2824). - lane C incremental deploy differential (kit from #4849). - v0.38.0 sweep: compile dependency-policy run and preview (#4734), a converged install writes nothing (#4790), hook bundle approval pin (#4688), a registry URL on a local host (#4521). - burndown: a denied local bundle is refused unwritten (#4646), present- provenance-unknown x denied-executable (#4767), audit --ci judges locked content with apm_modules gone, merged-hook entry detection end to end (#4798). Review folds: I5 admits the compile record only as a regular file and its newly created ancestor directories; run/preview, content-types, plugin-root hook, lane C fresh twin, source-machine bundle identity, self_defined warn and hook bundle update oracles tightened; the self_defined warn row is a real warn-mode policy now and is strict known on #5070; the #4826 refusal row checks rollback; no-write stamps add the POSIX change time. U-USER-SCOPE-ORG-POLICY removes explicit user-scope cells only: the four scope-free T1 bin x denied-dependency cells are required, witnessed by the project matrix refusals. Ledger regenerated (baseline 3, known-failing 1, required 2423). Co-authored-by: Copilot App <[email protected]>
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.

Description
Follow-up to #4304 and #4317:
deps/registry/url_scheme.py_is_local_hostnow callsutils/net.pyis_local_network_host. One owner now decides which hosts count as local network, so the duplicated RFC 1918 table is removed.The registry URL scheme guard now requires this delegation, and the owner record is updated to match.
Important
Behaviour change (decided under S15, logged here). The old local table parsed hosts through
parse_host_address, sohttp://167772161/apm,http://0x0a000001/apmandhttp://010.0.0.1/apmcounted as 10.0.0.1 and were accepted withoutinsecure: true. The shared owner parses strict dotted literals only, because socket resolvers read integer, hex and leading-zero spellings differently (a parser differential). Those spellings are now refused like any non-local host. Default taken: keep the stricter, fail-closed owner rather than re-adding a second parser. Migration: write the dotted address (http://10.0.0.1/apm) or setinsecure: true. Pinned by registry-level tests under both manifest contracts, with a CHANGELOG line under Changed.Based on
train/0.37-final-2(both #4304 and #4317 are in train 2); fold it after #4304.Issue and approved scope
Follow-up to #4304 (#4286) and #4317 (#4314). Asked for by the S lead under the rule that review follow-ups are fixed in this release.
Type of change
Testing
tests/unit/test_apm_yml_registries.py::TestRegistryUrlScheme::test_http_to_public_host_is_a_parse_erroradds the three non-literal spellingsThe existing RFC 1918 boundary tests stay the oracle: 10.x, 172.16.x and 192.168.x are accepted; 172.15.255.255 and 172.32.0.1 are refused. They are in
tests/spec_conformance/test_security_behavior_reqs.pyandtests/integration/test_registry_url_scheme_lifecycle.py. Ruff is clean.Changelog
## [Unreleased]inCHANGELOG.md(Changed).Spec conformance (OpenAPM v0.1)
apm-spec-waiver: req-sc-006 accepted dotted literals unchanged; host classification moves to its shared owner, which refuses non-literal IPv4 spellings