Why: this was the last file still binding hardcoded ports, so the test tree now carries none. test_svc_deploy_txn.py calls fx.seed_agent("txn", 9471) and fx.seed_agent("fwd", 9472), where fx is an IdentityTests instance whose seed_agent starts the stub binary and listens on the port given.
Evidence:
Verified by occupation: with 9471 and 9472 each held by an unrelated python3 -m http.server, both tests still pass. Before the change the first failed with [svc] 端口被占用(非本服务) on 9471.
free_test_port is imported from the shared tests/_port_alloc.py using the same sys.path preamble already used in tests/test_svc_identity.py. No new helper.
tests/test_svc_recover.py, which defines seed_agent, is untouched, as is tests/_port_alloc.py. No assertion was removed, skipped or relaxed, and no test logic changed beyond the port source.
The six affected modules are green together (127 tests, 2 skipped).
Scanning the whole tests/ tree for seed_agent("..", <literal>) and register_agent(.., <literal>) now returns zero matches, closing the governance that the earlier passes only applied to tests/test_svc.py.
Refs: final batch of the port governance that introduced tests/_port_alloc.py.
Why: this was the last file still binding hardcoded ports, so the test tree now carries none. `test_svc_deploy_txn.py` calls `fx.seed_agent("txn", 9471)` and `fx.seed_agent("fwd", 9472)`, where `fx` is an `IdentityTests` instance whose `seed_agent` starts the stub binary and listens on the port given.
Evidence:
- Verified by occupation: with 9471 and 9472 each held by an unrelated `python3 -m http.server`, both tests still pass. Before the change the first failed with `[svc] 端口被占用(非本服务)` on 9471.
- `free_test_port` is imported from the shared `tests/_port_alloc.py` using the same sys.path preamble already used in `tests/test_svc_identity.py`. No new helper.
- `tests/test_svc_recover.py`, which defines `seed_agent`, is untouched, as is `tests/_port_alloc.py`. No assertion was removed, skipped or relaxed, and no test logic changed beyond the port source.
- The six affected modules are green together (127 tests, 2 skipped).
- Scanning the whole `tests/` tree for `seed_agent("..", <literal>)` and `register_agent(.., <literal>)` now returns zero matches, closing the governance that the earlier passes only applied to `tests/test_svc.py`.
Refs: final batch of the port governance that introduced `tests/_port_alloc.py`.
Why: establish the authorized task workspace and its initial baseline.
Evidence: preserved precheck receipt in .task/fix-svc-test-port-governance-deploy-txn.md; R0=cb36b59accd0418c5ca952912d7c181b83038a4c.
Impact: task metadata only; the feature workspace starts at cb36b59acc.
Refs: .task/fix-svc-test-port-governance-deploy-txn.md
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why: this was the last file still binding hardcoded ports, so the test tree now carries none.
test_svc_deploy_txn.pycallsfx.seed_agent("txn", 9471)andfx.seed_agent("fwd", 9472), wherefxis anIdentityTestsinstance whoseseed_agentstarts the stub binary and listens on the port given.Evidence:
python3 -m http.server, both tests still pass. Before the change the first failed with[svc] 端口被占用(非本服务)on 9471.free_test_portis imported from the sharedtests/_port_alloc.pyusing the same sys.path preamble already used intests/test_svc_identity.py. No new helper.tests/test_svc_recover.py, which definesseed_agent, is untouched, as istests/_port_alloc.py. No assertion was removed, skipped or relaxed, and no test logic changed beyond the port source.tests/tree forseed_agent("..", <literal>)andregister_agent(.., <literal>)now returns zero matches, closing the governance that the earlier passes only applied totests/test_svc.py.Refs: final batch of the port governance that introduced
tests/_port_alloc.py.