F-harness: scriptable tunnel-fault proxy + test clock + deterministic kill hook (#1049) - #1051
Merged
Merged
Conversation
AC2: deterministic advance with deadline-ordered firing (same-deadline in registration order), chained timers due inside the same advance, negative advance refused, pending() next-due probe. Lease expires exactly at issue+ttl on the injected clock, renews from the renewal instant, onExpiry fires through the clock — zero wall-clock waiting (spec-20260913-114814 §8).
… modes (#1049) AC1+AC4: DROP black-holes (client timeout, zero handshake bytes), HALF-OPEN delivers the accepted greeting then silence (distinguishable from DROP by those bytes alone), REFUSE closes the listener (true ECONNREFUSED, same port rebound on exit), CLEAN-CLOSE is an orderly zero-payload FIN, PASS proxies. Schedules are {mode, probes} plans run with every transition awaited — sustained no-response windows and healthy-then-dead sequences reproduce from the plan; a signature-uniqueness test guards mode collisions (spec §8). node:net/node:timers only; teardown waits for every socket (H4).
…ignal races (#1049) AC3 + F2 shape: KillHookRegistry arms stop/throw/crash at NAMED state-machine boundaries; JournalingCommitter (the representative consumer) invokes them at pre-commit (after verify, pre-journal) and mid-commit (post-journal, pre-done). Tests prove the target stops AT the named point via state, journal and trace; mid-commit stop/crash leaves it journaled and resume() replays to committed — restored-or-journaled, never torn; named-point specificity (an armed pre-commit never fires mid-commit); the scenario reproduces from config.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
jeonghun-jj-lee
force-pushed
the
main
branch
from
September 13, 2026 14:20
88fb5da to
ea68825
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P2 of the approved fleet rearchitect (spec-20260913-114814 §8 — the F-harness deliverable). Pure test infrastructure: 7 files, all under
packages/extension/test/**, 1109 insertions, zero runtime changes, zero new dependencies (node:net / node:timers / node:events only).What lands:
FaultProxy— scripted tunnel-fault schedules with five OBSERVABLY DISTINCT modes, each mode's signature asserted mechanically (DROP → timeout w/ 0 handshake bytes; HALF-OPEN → timeout w/ accepted greeting; REFUSE → ECONNREFUSED via listen-level window; CLEAN-CLOSE; PASS), plus sustained no-response windows (N consecutive outcomes) and healthy-then-dead-then-healthy sequences (the F4 shape)FakeClock+Lease— deterministic time source: deadline-order firing, same-deadline registration order, chained timers, callback-observes-deadline; lease expiry driven to expiry and back with zero wall-clock waiting (the F5 fixture's consumer)KillHookRegistry+SimulatedCrash+JournalingCommitter— faults at NAMED state-machine points (pre-commit / mid-commit), restored-or-journaled never torn (the F2 fixture's registry; the real mode machine consumes the same registry in P4)Gate evidence (director re-run, from commands):
src/amicode_service/slack_api.ts:251TS6133 — pre-existing on main (arrived with merged feat(slack): add slack_api.ts shared module — HTTP layer, caches, target resolution, formatting #1042/feat(slack): add amicode_slack_list, amicode_slack_read, amicode_slack_send MCP tools #1043; this diff adds no src changes), owned by that file's landing PRTDD trail: 4 commits, RED→GREEN per criterion; the first cast's surviving RED clock test was adopted verbatim (never weakened). Teardown waits for process exit (the H4 lesson). Fault determinism: transitions only between awaited probes.
Blocks: the F1–F10 fixtures of P4–P9 (all consume this harness). Merge is human; the documented pre-existing reds are weighed per the #827 precedent.