fix(#812 follow-up): normalize detect-platform.sh host-match port comparison by scheme
Some checks failed
ci/woodpecker/pr/ci Pipeline was canceled
Some checks failed
ci/woodpecker/pr/ci Pipeline was canceled
gitea_url_matches_host compared every remote authority's port directly against the configured HTTP(S) API URL's port, which conflated two unrelated things and normalized default web ports asymmetrically: - An SSH remote's transport port (e.g. ssh://git@host:2222/...) was compared against the configured HTTP(S) port, even though the SSH daemon port has nothing to do with the Gitea HTTP(S) API port. - An explicit default port on the remote (https://host:443/...) failed to match an implicit (portless) configured URL, while the inverse (implicit remote vs. explicit configured) already matched -- the default-port equivalence was only applied on one side. Fix get_remote_host() to strip an SSH transport port before it ever reaches host-match, and make gitea_url_matches_host's default-port normalization symmetric (":443" https / ":80" http is equivalent to the implicit form on BOTH sides). Adds red-first regressions for both repros to test-pr-review-gitea-comment.sh (extending the #812 harness) and wires that harness into packages/mosaic's test:framework-shell chain so it runs under `pnpm test`. Closes #850
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
"lint": "eslint src",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run --passWithNoTests && pnpm run test:framework-shell",
|
||||
"test:framework-shell": "python3 src/lease-broker/daemon_deadline_unittest.py && python3 src/lease-broker/normative_fragments_unittest.py && python3 src/lease-broker/receipt_challenge_unittest.py && python3 src/lease-broker/context_recovery_unittest.py && python3 src/lease-broker/recovery_runtime_unittest.py && python3 src/lease-broker/recovery_b1_adversarial_unittest.py && python3 src/lease-broker/framework_skill_portability_unittest.py && python3 src/mutator-gate/runtime_tools_unittest.py && python3 src/mutator-gate/runtime_launch_guard_unittest.py && python3 framework/tools/lease-broker/check-runtime-launches.py --root ../.. && bash framework/tools/codex/test-pr-diff-context.sh"
|
||||
"test:framework-shell": "python3 src/lease-broker/daemon_deadline_unittest.py && python3 src/lease-broker/normative_fragments_unittest.py && python3 src/lease-broker/receipt_challenge_unittest.py && python3 src/lease-broker/context_recovery_unittest.py && python3 src/lease-broker/recovery_runtime_unittest.py && python3 src/lease-broker/recovery_b1_adversarial_unittest.py && python3 src/lease-broker/framework_skill_portability_unittest.py && python3 src/mutator-gate/runtime_tools_unittest.py && python3 src/mutator-gate/runtime_launch_guard_unittest.py && python3 framework/tools/lease-broker/check-runtime-launches.py --root ../.. && bash framework/tools/codex/test-pr-diff-context.sh && bash framework/tools/git/test-pr-review-gitea-comment.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mosaicstack/brain": "workspace:*",
|
||||
|
||||
Reference in New Issue
Block a user