Why: establish the authorized task workspace and its initial baseline.
Evidence: preserved precheck receipt in .task/fix-remaining-hardcoded-ports.md; R0=444fb1dee2a72452be23b97cbaaad9e28c42dffd.
Impact: task metadata only; the feature workspace starts at 444fb1dee2.
Refs: .task/fix-remaining-hardcoded-ports.md
Why: the card must carry the helper's design boundary, the (r1 scope-expansion
-> granted expansion -> r2 success) trajectory, the independent review verdict
and the runtime evidence before delivery.
Evidence:
/tmp/ports-load-20261021.json: helper test under 64-load OK
/tmp/ports-svc-tests-20261021.json: tests.test_svc 23 OK
/tmp/ports-governance-20261021.json: 527 OK (18 skipped)
/tmp/remaining-ports-impl-r2-20261021.json: cursor, success
/tmp/remaining-ports-review-r1-20261021.json: pi-glm, PASS
Impact: card metadata only.
Refs: PR #676; fix/remaining-hardcoded-ports
Why: close the task card inside its own PR so landing it needs no post-merge backfill or separate close PR.
Evidence: .task/fix-remaining-hardcoded-ports.md -> .task/archive/fix-remaining-hardcoded-ports.md; status 已完成(合入前闭合); PR #676https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/676.
Impact: task metadata only; the card is archived within PR #676 and lands with its merge commit.
Refs: task.sh close --self
weichen
merged commit 096b74b477 into main2026-10-21 11:04:28 +00:00
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.
fix/remaining-hardcoded-ports 任务卡
任务主记录:<PR 链接,交付前填写>;状态:进行中;owner:weichen
权威仓:ssh://git@192.168.3.2:2222/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)=
444fb1dee2工作区:/home/weichen/projects/Agent-System-Dev-wt-fix-remaining-hardcoded-ports(worktree);分支:fix/remaining-hardcoded-ports
分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=f58f9b9127d88193b75ab8240478a0be0643a63075d58cc54884dfc7b9b4e64e;triage_receipt=/tmp/triage-remaining-port-flakes-20261021.json;receipt_sha256=e190b63d6a5bbcb0285d38a8ae9e1a548a6fb3e3a16dffe8e96dd54cc344a27b
授权与交付终点:消除 PR #668 Review 记下的同类端口硬编码脆弱面,提取 helper 并应用到 tests/test_svc.py 与 tests/test_svc_realcombo.py 的相关位点。不得改 scripts/svc.sh、不得削弱断言、不得改动 test_svc_recover.py / test_task_pr_check.py / test_task_triage.py 的端口。
交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
目标与非目标
<预期结果、受影响入口/模块/契约;明确不做什么。>
Agent 实施收据
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
同步记录
444fb1dee2444fb1dee2证据(Evidence)
结果与验证(完成后填写)
tests/_port_alloc.py(free_test_port()每次调用通过 socket reservation 拿一个真正空闲的端口,with 块退出立即 close)。修改tests/test_svc.py(6 处svc ... --port 18842/18843/18844改为每次 alloc 一个端口,668 与 942 行使用同一分配值因为是同一测试中相同实例的重复确认)和tests/test_svc_realcombo.py(3 个用例各 alloc 一次端口,seed_real/svc/http_ok 三处共享)。register_pg/DSN 18951按 PR #668 Review 注明仅写 svc.env、从不绑端口,保留不动;test_svc_recover.py已有自己的free_fixture_port不动;test_task_pr_check.py/test_task_triage.py的端口仅作字典键,不绑端口。tests.test_port_alloc在 64 负载下 OK;tests.test_svc23 项 OK;治理套件 527 项 OK(18 skipped);PR #668 的目标用例test_static_fresh_deploy_registers_pidcheck_and_starts仍通过。独立 Review(pi-glm,PASS 无阻塞项)。合入与清理
.task/reviews/2026-10-20-remaining-ports-review.md;无阻塞项,3 项非阻塞建议;重放依据:host 独立跑治理套件与 64 负载下的 helper 测试)