Repository navigation
test: close logging fixture timers without changing runtime - #257
Conversation
Two SSE fixtures left real keep-alive handles after their assertions passed. Reproduce the two allocation stacks, require zero owned timers per stream case, and simulate the existing disconnect callback. Focused controller82/82 and HTTP62/62 pass with natural exit; full serial HTTP2570 pass plus42 existing skips. Do not attribute the separate parallel E2E warning or alter application timers, runner limits or forceExit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reuse the exact manifest and companion README generated and live-verified in preserved commit6716b3bb. Prove byte identity and offline currency before the follow-up protected push. Record the base-transition preflight gap; no manual date restamp, refetch, age waiver or unrelated diagnostic source. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Full-unit handle diagnostics attributed two remaining intervals to runtime setters called before module initialization in prune fixtures. Configure startup through the existing environment, restore it exactly, and assert zero timers after shutdown. The guard was RED in exactly two cases;99 focused tests and all6214 serial unit tests now pass with natural exit and no reported open handles. No application lifecycle or runner limit change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain actual parent and worker exit timing, native Environment milestones, and the controlled observer result. Distinguish the measured notification gap from proven unit fixture timer leaks without changing runner limits or claiming native root cause. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Parallel HTTP warning: actual lifecycle evidenceDocumentation-only follow-up Two actual two-worker diagnostics each pass 118 suites / 2,514 tests, with
The parent's SIGTERM and SIGKILL calls return false. After shutdown dispatch This attributes the observed phase, not the final native cause. Worker The RC-I110 explanation and flow New validation
Exact-tip hosted checks
The actual new scan logs still identify body-parser 2.3.0 / |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Windows shutdown observation published at 9d6d5c6The normal protected push passed 25/25 Fast gates in 543 seconds. The passive Windows diagnostic makes a narrower, useful distinction:
Pinned libuv source checks exit status in its kill path but registers exit The updated RC-I110 Actual new exact-tip hosted results:
Both actual new scan logs confirm two HIGH / zero CRITICAL: PR #257 stays draft with zero unresolved review threads at the current read. |
Follow-up: the long wait is before Windows process-completion signalingA stronger ignored, read-only diagnostic, not an application or runner The new ordinary-selector parallel HTTP run passes 118 suites / 2,514
Both callbacks fall inside their approximately 47 ms completion brackets. The safe bracket uses the preceding query's start, not its end, as the Separate security progress: approved-feed time metadata now proves that |
Preserve PR258 security source and CI-owned locks alongside PR257 fixture corrections and historical Windows diagnostics. Resolve only current documentation status at product 0.55.61. Focused fixtures 99/99, pins 29/29 and installed inventory pass; protected Validate push and exact-tip hosted checks remain required. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the logging-test timer cleanup changes.
No open issues 🎉
What changed in this PR
This PR fixes four logging-test timer leaks without changing application behavior or test-runner settings. It also documents the separate parallel HTTP worker-exit warning, whose cause remains unresolved.
Changes:
- Disconnect two SSE fixtures through their registered close callback and assert zero pending timers after each stream test.
- Configure prune startup before service construction, restore environment values exactly, and verify timer cleanup after shutdown.
- Record validation evidence, diagnostic limitations, and integration with merged security changes.
| File | Description |
|---|---|
Session_starter.md |
Updates integration context, fixture results, and remaining investigation boundaries. |
docs/strategy/ENGINEERING_LESSONS_AND_PATTERNS.md |
Documents lifecycle-based diagnosis and non-disruptive observer practices. |
docs/SCIM_CORRECTNESS_EXECUTION_ISSUES_AND_RCA.md |
Records timer-leak causes, fixes, and worker-exit diagnostic evidence. |
docs/CONTEXT_INSTRUCTIONS.md |
Refreshes project context and distinguishes historical results from current validation. |
CHANGELOG.md |
Summarizes fixture cleanup, diagnostics, and security-master integration. |
api/src/modules/logging/logging-auto-prune.spec.ts |
Corrects startup fixtures, preserves environment state, and asserts timer cleanup. |
api/src/modules/logging/log-config.controller.spec.ts |
Disconnects SSE fixtures and adds zero-timer teardown assertions. |
Review effort: Balanced
Actual merged-master checkpointNormally merged as The actual merged-source Build Test Image run 40892935677 Actual merged-source immutable image: The four proven fixture leaks are corrected without changing production The independent Seroval/Undici advisory remediation is proceeding separately. |
Summary
Current integration checkpoint, 29 October 2026: normal merge
aa7865164f8b5af8831c526b98cc08eaffc7be83preserves fixture head9d6d5c62and merged security master
80460d59as its two parents. Product is 0.55.61.Both CI-owned locks, manifests and dependency-pin tests are byte-identical
to merged master. This PR adds no runtime/dependency changes above master.
Keep this PR draft; no merge or deployment is requested.
The dated pre-integration measurements below remain historical evidence,
not the current dependency or image status. RFC prerequisites now also exist
in master, so neither RFC file remains in this PR's diff.
Correct four proven logging-test timer leaks without changing application
timers, lifecycle, timeouts, worker counts, force-exit settings or versions.
assert response completion, and require zero timers after each stream case.
Configure startup before construction, restore environment exactly, and
require zero timers after service shutdown.
from preserved commit
6716b3bb, proved byte-identical and offline GREEN.No diagnostic/performance source or baseline is imported.
5bfff2de. PR ci: qualify membership performance on isolated Linux runners #251 remains separate,draft and held; no merge or deployment is requested by this checkpoint.
Linked Defect / Plan Reference
docs/SCIM_CORRECTNESS_EXECUTION_ISSUES_AND_RCA.mdRC-I107, RC-I108 and RC-I109.TDD Process
api/src/security/)Both zero-timer guards failed in exactly their two defective fixture cases
with expected zero / actual one. The complete serial unit diagnostic now
exits naturally after 6,214 passes, instead of retaining the two prune handles.
Feature / Bug-Fix Commit Checklist (standing rule)
Every behavioral change must include all that apply. Tick or strike through with N/A + reason.
E2E Tests - end-to-end spec underN/A: no HTTP behavior changed. Existing 62 focused and 2,570 complete serial HTTP tests were executed.api/test/e2e/exercising the feature through HTTPLive Integration Tests - new section inN/A: test-fixture-only change; no live estate was mutated.scripts/live-test.ps1runnable against local + Docker + Azuredocs/with architecture, RFC references, Mermaid diagrams, test coverage. Existing RCA ledger updated; no new feature or diagram.INDEX.md Update - add the new doc reference toN/A: no new feature document.docs/INDEX.md[Unreleased]entry with full test counts and feature summarySession_starter.mdanddocs/CONTEXT_INSTRUCTIONS.mdVersion Management - bumpN/A: test/docs-only integration; product 0.55.61 is inherited unchanged from merged security master.api/package.json(and any other version refs) when behavior changedResponse Contract Tests - API responses contain ONLY documented fields (key allowlist assertion at unit + E2E + live)N/A: no response contract change; existing HTTP assertions were run unchanged.Validation Output
Current integration
aa786516:pwsh -NoProfile -File scripts\sync-rfcs.ps1 -Quietpwsh -NoProfile -File scripts\audit-doc-freshness.ps1 -BaseRef origin/fix/log-stream-test-teardown-20261028 -Quietnode scripts\audit-doc-content.mjsnpm test -- --runInBand --detectOpenHandles --runTestsByPath src/modules/logging/log-config.controller.spec.ts src/modules/scim/controllers/endpoint-log.controller.spec.ts src/modules/logging/logging-auto-prune.spec.tsnpm test -- --runInBand --runTestsByPath src/scripts/check-dependency-pins.spec.tsnpm ls body-parser multer iconv-lite --all --json$env:PREPUSH_MODE='Validate'; git push origin fix/log-stream-test-teardown-20261028No manually repeated broad suite preceded the hook. The retry changed only
the required process environment, copied from build-test.yml; no gate,
deadline, worker count, exclusion or fallback was changed. The separate
ordinary HTTP worker warning remains unresolved and is not kill-success proof.
The first hosted-review request with plain
copilotwas rejected; thedocumented
@copilotselector succeeded and started exact-tip hosted review.Final new-tip hosted outcomes are all PASS:
validate, immutable-image smoke and unchanged HIGH/CRITICAL Trivy gate PASS.
PR test-merge revision
aceb41776351165511b05f543407848a5b87f3e1has thesame tree
b79cd4037e6661abcff9cf56985edebf509542caas headaa786516.Image:
sha256:eba8aadc9b3aebe0a0cb24204a7fe14bd41e4f4272d63daebefbbc210be9e435.validate, exact-head immutable-image smoke and unchanged HIGH/CRITICAL
Trivy gate PASS. Revision
aa7865164f8b5af8831c526b98cc08eaffc7be83.Image:
sha256:2c01642e82b2ab2f2199bbe53222642dd9d6fcd2af4803035a4b298f14345fc6.PASS; analysis 2054515360 identifies current PR test merge
aceb4177with results_count 0. Separate paginated current PR merge-ref query: zero
open alerts. This is not a repository-wide alert-clearance claim.
RFC has no new hosted path trigger because its files are now already in
master; local preflight and protected RFC gate PASS.
PASS. Review 5699366264 at exact head recommends approval with no active
issues. All review comments/threads retrieved: zero, unresolved zero.
Both image scans retain
severity: HIGH,CRITICAL,ignore-unfixed: true,and the existing OS/library scope and documented ignore file. No scan
suppression or scope downgrade was introduced. PR257 remains draft.
Historical pre-integration validation:
Exact commands and observed results:
node node_modules\jest\bin\jest.js --runInBand --detectOpenHandles --runTestsByPath src\modules\logging\log-config.controller.spec.ts src\modules\scim\controllers\endpoint-log.controller.spec.ts src\modules\logging\logging-auto-prune.spec.ts: PASS, 99 tests, natural exit.node node_modules\jest\bin\jest.js --runInBand --detectOpenHandles: PASS, 213 suites / 6,214 tests, natural exit in 83.657 seconds, no reported open handles.node node_modules\jest\bin\jest.js --config test\e2e\jest-e2e.config.ts --runInBand --detectOpenHandles --runTestsByPath test\e2e\log-config.e2e-spec.ts test\e2e\endpoint-scoped-logs.e2e-spec.ts test\e2e\scim-event-sse-bridge.e2e-spec.ts: PASS, 62 tests, natural exit.node node_modules\jest\bin\jest.js --config test\e2e\jest-e2e.config.ts --runInBand --detectOpenHandles: PASS, 120 suites / 2,570 tests, existing two suites / 42 skips, natural exit in 372.871 seconds.git diff --exit-code 6716b3bb -- docs\rfcs\rfc-manifest.json docs\rfcs\README.md: PASS, exact artifact identity.pwsh -NoProfile -File scripts\sync-rfcs.ps1 -Quiet: PASS, current/intact corpus; existing four waiver warnings unchanged.$env:PREPUSH_MODE='Fast'; git push origin fix/log-stream-test-teardown-20261028: PASS, default normal hook 25/25 gates in 558.6 seconds, final head2d57e785d2f3a224f64ffcf97f6280f094162f7b.The full serial HTTP selector includes two log suites / 56 tests excluded by
ordinary CI/pre-push. Those exclusions and ordinary parallel settings are
unchanged. Serial natural exit does not retrospectively explain the independent
historical parallel HTTP worker warning. No no-leak claim is inferred from
the ordinary HTTP command's existing
--forceExit.The final ordinary unit run no longer emits the worker-force-exit warning.
The final ordinary parallel HTTP run still emits it; that separate cause
remains open and is not claimed fixed by these unit-fixture changes.
The first partial push was stopped after identifying the new base's expired
RFC date; it published nothing. A subsequent complete hook passed 25/25 in
487.1 seconds but retained a unit warning, which led to the second diagnosis
and correction rather than treating assertion-green as lifecycle-green.
Docker/live/Playwright/deployment matrices were not rerun: no runtime or UI
behavior changes, and independent release security/performance holds remain.
Exact-tip hosted results are recorded separately after publication; known
body-parser/multer image findings are not waived by this test correction.
Historical hosted evidence at
2d57e785d2f3a224f64ffcf97f6280f094162f7b:Keep this PR draft and held. Issue #256 tracks approved dependency remediation;
no exception, suppression, merge or deployment follows from these fixture fixes.
The former body-parser/multer observations above describe old images; the
current master remediation is PR #258. Issue #256 also has independent API/web
advisory records, so this integration neither closes it nor claims global
security clearance. Parent reports master CodeQL PASS but 107 pre-existing
OPEN repository alerts, zero first-created since that merge. A successful
CodeQL workflow is not an empty repository alert inventory.
Outstanding release evidence remains performance 1.23928982 > 1.10,
customer-data proof, cleanup 403, measured-browser/human visual proof and the
global competing Mermaid renderer conflict. PR #251 remains separate at
e5e107f5; no overall release completion is claimed.Standing Rules Acknowledgment
U+2014) anywhere in the diff. Verified viaSelect-String -Pattern ([char]0x2014).git commit --amendon history that has been pushed.api/src/security/forbidden-source-patterns.spec.tswill catch known anti-patterns.api/src/scripts/lint-migrations.tsenforces this. No migration changed.Destructive Migration Override (skip if not applicable)
N/A: no migration or schema change.
ALLOW_DESTRUCTIVE_MIGRATION=1in the CI environment for this PRReviewer Hint
Diff areas worth special attention from the reviewer:
allocation stacks. Design disposition: accepted; typed fixture helpers and
the existing application lifecycle suffice without a new abstraction.