Skip to content

fix: harden runtime lifecycle and input handling#96

Merged
h3zh1 merged 31 commits into
devfrom
fix/project-hardening
Jul 14, 2026
Merged

fix: harden runtime lifecycle and input handling#96
h3zh1 merged 31 commits into
devfrom
fix/project-hardening

Conversation

@h3zh1

@h3zh1 h3zh1 commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • linearize TCP, HTTP, REM, global listener, and Forward lifecycle operations, including failed runtime
    replacement and bounded REM shutdown
  • enforce a single active Forward task stream and roll back uncommitted resources on bind, cmux, backpressure,
    and concurrent close failures
  • harden untrusted Malefic input with encoded and decoded size limits, Snappy validation before allocation, and
    bounded initial and payload reads
  • synchronize shared client and Session runtime state, including sysinfo snapshots and atomic keypair updates
  • make event subscription, startup replay, and stream shutdown explicit and atomic, with an acknowledged
    subscription barrier
  • remove the unused RequestAndWait path and wait for Forward Listener shutdown
  • restore artifact website publishing through the supported raw-content path while preserving format, RDI,
    metadata, and default path handling
  • expand concurrency, fuzz, lifecycle, and integration coverage and align GitHub Actions with Go 1.25

Validation

  • go vet ./...
  • go test ./... -count=1 -timeout 300s
  • CGO_ENABLED=0 go build ./...
  • CI-equivalent race tests for core, parser, and stream
  • full client/server integration package selection
  • repeated parser, lifecycle, backpressure, rollback, cache, subscription barrier, and Forward Listener tests
  • independent reviewer approval

h3zh1 and others added 30 commits July 11, 2026 21:45
Merge the read-modify-write of the session key pair under a single write lock so a re-register and a key rotation cannot read the same base snapshot and clobber each other. Rename UpdateKeyPairFieldsAndPushCtrl to UpdateKeyPair (the old full-replacement method is now unused).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Close waited indefinitely on startState.done while con.Listen ignores cancellation, so a stuck console link could wedge listener shutdown. Cap the wait at remStartCloseTimeout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Stop the accept loop before restoring the seam so a late retry cannot call the default Accept on a nil console and crash the whole package; widen the timing windows to remove flakiness.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Explain that an Important event dropped on a full broker queue is also absent from replay history, and document the eventSlots one-slot-per-in-flight-entry invariant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@h3zh1
h3zh1 marked this pull request as ready for review July 14, 2026 09:33
@h3zh1
h3zh1 merged commit e2eb43b into dev Jul 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant