PR #49: residual notes from the last merge-gate reviews (url rules, document tests) #50

Open
opened 2026-11-13 21:33:30 +00:00 by svc-agent-writer · 1 comment

Two reviews of PR #49 (issue #32, head 005a73c) found no blocker and no should-fix item, after four rework rounds. They left the notes below. None of them sends the Feeder token, or any data, to an address that the config does not name.

Feeder url wording (README.md:42, SECURITY.md:36)

  1. "Unspecified addresses are refused" holds for an address literal only. A DNS name that resolves to 0.0.0.0 passes config and then reaches the local host. Say "unspecified address literals are refused".
  2. A leading zero in the port (:08421) and upper-case hex in an IPv6 literal are accepted. Both connect to the configured host. State them or refuse them.
  3. Config also accepts link-local IPv6 ([fe80::1]), multicast (224.0.0.1) and broadcast (255.255.255.255) hosts. The README makes no claim about them. Decide whether to refuse them.
  4. The connect timeout applies to each address that a name resolves to, so a name with N addresses can take N x 30 s. README:48 names reads and writes only.
  5. SECURITY.md:36 says a test proves that sync connects "only to the Feeder". Align it with "the addresses of the one configured Feeder host".
  6. The url row holds about eight rules in one table cell. Move them to a list.

Tests (tests/test_sync_documents.py)

  1. The R1 test does not pin the R1 clause: the host, path and port rules refuse DEL and C1 first, so the R1 clause is redundant. Keep the clause and give it a case that only it refuses, or remove it.
  2. The R20 IP-branch clause (config.py:154) is dead code, because urlsplit already refuses [127.0.0.1] and [localhost].
  3. test_the_sync_text_names_no_host (:201) captures [, so a bracketed loopback example such as http://[::1]:8421 would fail it wrongly.
  4. These document edits pass every test: the "Order after an upgrade" steps in reverse order, and 503 changed in the schema-pin row or in the SECURITY "503 with unavailable" sentence.

Other

  1. The README sync bullet lost the sentence "The loop retries a failed pass unless it has a stop code." The code table states the same rule.
  2. An oversized 401 on a paged call is asked again down to a limit of 1, so one pass can send the token about ten times to the same configured Feeder. README:71-72 states this. Decide whether 401 should stop the halving.

Decisions

  • Item 2: refuse a port with a leading zero and upper-case hex in an IPv6 literal. A url has one spelling.
  • Item 3: refuse link-local, multicast and broadcast hosts in config.
  • Item 7: keep the DEL and C1 clause as a named check, and test that check on its own.
  • Item 8: remove the bracket clause of the IP branch. A test proves that [127.0.0.1] and [localhost] are refused.
  • Item 12: a 401 stops the halving. The status is checked before the size, so a refused token is sent once per call. The README sentence "a reply over the size cap reports response-too-large first" changes to match.
  • Items 1, 4, 5, 6, 9, 10 and 11: fix as the body says.

Acceptance criteria

  • Each item is fixed as recorded under ## Decisions. A test covers each code change and each document rule.
  • make check passes.

Human act

ruling: the operator sets svd:go to approve dispatch of this Feeder-token change (CONV-40)

Blocked by


Filed under: operator word "Accept. Proceed" sha256:94d7525a5334

Two reviews of PR #49 (issue #32, head `005a73c`) found no blocker and no should-fix item, after four rework rounds. They left the notes below. None of them sends the Feeder token, or any data, to an address that the config does not name. ## Feeder `url` wording (`README.md:42`, `SECURITY.md:36`) 1. "Unspecified addresses are refused" holds for an address literal only. A DNS name that resolves to `0.0.0.0` passes config and then reaches the local host. Say "unspecified address literals are refused". 2. A leading zero in the port (`:08421`) and upper-case hex in an IPv6 literal are accepted. Both connect to the configured host. State them or refuse them. 3. Config also accepts link-local IPv6 (`[fe80::1]`), multicast (`224.0.0.1`) and broadcast (`255.255.255.255`) hosts. The README makes no claim about them. Decide whether to refuse them. 4. The connect timeout applies to each address that a name resolves to, so a name with N addresses can take N x 30 s. README:48 names reads and writes only. 5. `SECURITY.md:36` says a test proves that sync connects "only to the Feeder". Align it with "the addresses of the one configured Feeder host". 6. The `url` row holds about eight rules in one table cell. Move them to a list. ## Tests (`tests/test_sync_documents.py`) 7. The R1 test does not pin the R1 clause: the host, path and port rules refuse DEL and C1 first, so the R1 clause is redundant. Keep the clause and give it a case that only it refuses, or remove it. 8. The R20 IP-branch clause (`config.py:154`) is dead code, because `urlsplit` already refuses `[127.0.0.1]` and `[localhost]`. 9. `test_the_sync_text_names_no_host` (`:201`) captures `[`, so a bracketed loopback example such as `http://[::1]:8421` would fail it wrongly. 10. These document edits pass every test: the "Order after an upgrade" steps in reverse order, and `503` changed in the `schema-pin` row or in the SECURITY "`503` with `unavailable`" sentence. ## Other 11. The README sync bullet lost the sentence "The loop retries a failed pass unless it has a stop code." The code table states the same rule. 12. An oversized `401` on a paged call is asked again down to a `limit` of 1, so one pass can send the token about ten times to the same configured Feeder. README:71-72 states this. Decide whether `401` should stop the halving. ## Decisions - Item 2: refuse a port with a leading zero and upper-case hex in an IPv6 literal. A `url` has one spelling. - Item 3: refuse link-local, multicast and broadcast hosts in config. - Item 7: keep the DEL and C1 clause as a named check, and test that check on its own. - Item 8: remove the bracket clause of the IP branch. A test proves that `[127.0.0.1]` and `[localhost]` are refused. - Item 12: a `401` stops the halving. The status is checked before the size, so a refused token is sent once per call. The README sentence "a reply over the size cap reports `response-too-large` first" changes to match. - Items 1, 4, 5, 6, 9, 10 and 11: fix as the body says. ## Acceptance criteria - Each item is fixed as recorded under `## Decisions`. A test covers each code change and each document rule. - `make check` passes. ## Human act ruling: the operator sets `svd:go` to approve dispatch of this Feeder-token change (CONV-40) ## Blocked by - #38 - #44 --- Filed under: operator word "Accept. Proceed" sha256:94d7525a5334
Author
Member

This was generated by AI during triage.

Triage

  • Confirmed on main (e29bbbe), offline:
    • config accepts :08421, [FD12::5], [fe80::1], 224.0.0.1 and 255.255.255.255, and refuses only unspecified address literals;
    • urlsplit already raises on [127.0.0.1] and [localhost], so the bracket clause never refuses anything;
    • the host regex of test_the_sync_text_names_no_host captures [ from http://[::1]:8421;
    • the README lost "retries a failed pass unless it has a stop code";
    • the size check runs before the 401 check, and _smaller halves limit down to 1 on response-too-large.
  • The operator accepted every lean. The body records them under ## Decisions.
  • CONV-40 rule 2 fires (about six files), and rule 3 overrides it: items 2, 3 and 12 decide which addresses get the Feeder token and how often it is sent. State: ready-for-human. The human act is the operator's dispatch approval (svd:go).
  • Blocked by #32 is replaced by #38 and #44. All three edit sync.py or source.py with README.md, so they dispatch one at a time (CONV-37). #50 goes last, so that its wording describes the code after the peer check and the Chat cap of #44.

Brief

Category: bug
Summary: the Feeder url rule has one spelling and refuses hosts that no Feeder can use; a 401 stops the page halving; the document tests catch the listed drifts.

Why a human gates it: the change decides where the Feeder token goes and how often. The design is settled; the operator approves the dispatch.

Desired behavior:

  • FeederConfig refuses a url with a leading-zero port, upper-case IPv6 hex, or a link-local, multicast or broadcast host. The DEL and C1 refusal is a named check with its own test. The unreachable bracket clause is gone, and a test pins the refusal of [127.0.0.1] and [localhost].
  • A Feeder reply with status 401 gives feeder-unauthorized before the size check, and the page halving stops on it.
  • The README [feeder] table states the url rules as a list and says "unspecified address literals are refused". The limits list says that the connect timeout applies to each address of a name. SECURITY.md says that sync connects only to the addresses of the one configured Feeder host. The sync bullet again says that the loop retries a failed pass unless it has a stop code.
  • The document tests catch: the upgrade steps in another order; a changed 503 in the schema-pin row and in the SECURITY 503 sentence; a bracketed loopback example.

Key interfaces: FeederConfig.feeder_url; FeederSource response handling; the sync page-halving helper; the README ## The sync worker section; the SECURITY ## What the sync worker limits section; tests/test_sync_documents.py.

Acceptance criteria: the list in the body.

Out of scope: the socket peer check and the Chat cap (#44); the exit rules of sync (#38).

> *This was generated by AI during triage.* ## Triage - Confirmed on `main` (`e29bbbe`), offline: - config accepts `:08421`, `[FD12::5]`, `[fe80::1]`, `224.0.0.1` and `255.255.255.255`, and refuses only unspecified address literals; - `urlsplit` already raises on `[127.0.0.1]` and `[localhost]`, so the bracket clause never refuses anything; - the host regex of `test_the_sync_text_names_no_host` captures `[` from `http://[::1]:8421`; - the README lost "retries a failed pass unless it has a stop code"; - the size check runs before the `401` check, and `_smaller` halves `limit` down to 1 on `response-too-large`. - The operator accepted every lean. The body records them under `## Decisions`. - CONV-40 rule 2 fires (about six files), and rule 3 overrides it: items 2, 3 and 12 decide which addresses get the Feeder token and how often it is sent. State: `ready-for-human`. The human act is the operator's dispatch approval (`svd:go`). - `Blocked by #32` is replaced by #38 and #44. All three edit `sync.py` or `source.py` with `README.md`, so they dispatch one at a time (CONV-37). #50 goes last, so that its wording describes the code after the peer check and the Chat cap of #44. ## Brief **Category:** bug **Summary:** the Feeder `url` rule has one spelling and refuses hosts that no Feeder can use; a `401` stops the page halving; the document tests catch the listed drifts. **Why a human gates it:** the change decides where the Feeder token goes and how often. The design is settled; the operator approves the dispatch. **Desired behavior:** - `FeederConfig` refuses a `url` with a leading-zero port, upper-case IPv6 hex, or a link-local, multicast or broadcast host. The DEL and C1 refusal is a named check with its own test. The unreachable bracket clause is gone, and a test pins the refusal of `[127.0.0.1]` and `[localhost]`. - A Feeder reply with status `401` gives `feeder-unauthorized` before the size check, and the page halving stops on it. - The README `[feeder]` table states the `url` rules as a list and says "unspecified address literals are refused". The limits list says that the connect timeout applies to each address of a name. `SECURITY.md` says that sync connects only to the addresses of the one configured Feeder host. The sync bullet again says that the loop retries a failed pass unless it has a stop code. - The document tests catch: the upgrade steps in another order; a changed `503` in the `schema-pin` row and in the SECURITY `503` sentence; a bracketed loopback example. **Key interfaces:** `FeederConfig.feeder_url`; `FeederSource` response handling; the sync page-halving helper; the README `## The sync worker` section; the SECURITY `## What the sync worker limits` section; `tests/test_sync_documents.py`. **Acceptance criteria:** the list in the body. **Out of scope:** the socket peer check and the Chat cap (#44); the exit rules of `sync` (#38).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/messages-mind-mcp#50
No description provided.