Repository navigation
test(portal-clis): isolate valid flag controls from live services - #581
MadsLorentzen merged 2 commits into
Conversation
MadsLorentzen
left a comment
There was a problem hiding this comment.
Verified on the real path and merge-ready; one ask before it lands: add a line under [Unreleased] > Fixed in CHANGELOG.md (one sentence in the file's house style, PR number in parentheses). Merge on push.
|
Addressed in The follow-up changes only |
The LinkedIn and Freehire positive controls spawned live search CLIs and only checked for the absence of BAD_ARG, so attempted portal requests still left a green suite. Use loopback responses and assert successful output plus the constructed freshness, pagination and result-limit contract. LinkedIn cards are verbatim excerpts from portapulito's actual captured response in PR MadsLorentzen#153; fixture provenance and original hashes are retained. Four Danish validation suites already stop at required-argument guards and need no change. This isolates these controls rather than claiming a whole-CI egress policy.
931e0d8 to
78bb90b
Compare
|
Merged. The three master controls really did attempt linkedin.com and freehire.me requests and stayed green with the parameter construction deleted; the new controls fail on that mutation and record zero non-loopback attempts. Fixture verified verbatim against the #153 capture. |
Three existing positive validation controls launch actual search CLIs without a response fixture: two in LinkedIn and one in Freehire. They assert only that the error is not
BAD_ARG, so they remain green when the child attempts an external request and subsequently fails for a network reason. The Freehire comment incorrectly claimed that checking the absence of an error made the case offline.Serve the LinkedIn controls a saved two-card response over loopback HTTP, and point Freehire's control at its existing loopback API override. Assert exit 0, empty stderr, actual freshness/pagination parameters and output; LinkedIn also checks IDs and client-side result limits. The four Danish validation suites already stop valid-value controls at required-argument guards, so they need no change.
Credit: portapulito captured the real LinkedIn guest response in #153, closed as an accidental personalized-fork submission. The JSON-encoded excerpt preserves its HTML bytes; source commit, original/excerpt hashes and capture date are recorded beside it. Freehire uses an explicitly synthetic empty JSON protocol response because this test concerns option/request construction, not portal content parsing.
Validation on Bun 1.4.3 / TypeScript 5.9.3:
This isolates these three controls. A JavaScript preload is not whole-CI OS egress enforcement; our complete local qualification separately uses an OS network sandbox. Existing public CI runs of unchanged upstream tests should not be described as intrinsically network-free on this basis. No production code, runtime dependencies, credentials or profile data changed.
At exact head
86bdf759, the complete 579-test Python suite and all three repository guards also pass.