Skip to content

Harden shared JSON stream cancellation and descriptor lifetime - #109

Merged
jdylanmc merged 3 commits into
pocketfrom
test/shared-json-lines
Oct 4, 2026
Merged

jdylanmc merged 3 commits into
pocketfrom
test/shared-json-lines

Conversation

@jdylanmc

@jdylanmc jdylanmc commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Shared stream lifetime hardening and coverage

Scoped implementation and validation complete at 0b08f277e0ac038578a5cf68c73309aa1291c144. Necessary work under open #7; this does not close the broader coverage issue.

The current pocket baseline, including merged #108, was integrated by a normal merge. The four Shared implementation/coverage paths remain byte-identical to reviewed 2c482c3; no source history was rewritten.

Criterion Evidence
Real newline-delimited input Owned Foundation pipes exercise fragmented records, parsing/error thresholds, reset policy, EOF and trailing fragments.
Cancellation and descriptor safety Demand-driven DispatchSourceRead owns descriptor lifetime; logical close rejects new work, physical disposal follows quiescence. Admitted callbacks remain cooperative, not falsely force-cancelled.
Backpressure No prefetch while the consumer callback awaits; ordering and early-stop behavior covered.
Cleanup/resource identity Close/cancel/admission/reuse cases, explicit fault controls and repeated stress runs retained.
Shared wire compatibility Two additional identity/secure-coding cases; no wire selector, payload or consumer policy change.
Candidate preservation and visible behavior Exact newly signed candidate completed admission plus all nine registered Settings/control outcomes. A separate repeat-preservation observation passed against its actual retained state. Limits below remain explicit.

Current validation

  • Fresh independent Roast and rubber-duck reviews completed at 0b08f277e0ac038578a5cf68c73309aa1291c144: no blocking code/design findings; necessary and aligned with Grow test coverage, starting with Shared/ #7.
  • Sixteen noninteractive local gates passed on this head, including 368 Python cases, 69 helper tests, 176 workflow contracts, 22 policy tests, 220 pixel-oracle cases, builds/lints and standalone harness compilation.
  • Full app-hosted tests remain in isolated GitHub runners, not the owner's normal desktop. Current-head hosted checks are green; the previous-head results are not substituted.
  • Historical same-implementation app coverage: 220 tests, including 30 stream and two new wire cases; separate 34 selected cases x 10 repetitions = 340 passes. These remain evidence of that unchanged implementation, not 340 new tests.
  • Exact current candidate: source 0b08f277e0ac038578a5cf68c73309aa1291c144, executable SHA-256 2cc692c83387a6e73a47c8f0d630c3a6eafe7cdf0590074657cd08168073bb94, version 0.1.0 (272), six code files/thirteen architecture signatures. Developer ID signed, NOT YET NOTARIZED, installed only in the owned guest with the previous app preserved.
  • Protected runner source remains separately identified as abfc8a2; it was not rebuilt, re-signed or reauthorized for this candidate.

Native results and preserved metadata qualification

The fresh candidate passed one About admission and the full nine-case suite:
four functional PASS results and five controls with the expected two FAIL /
three BLOCKED outcomes, zero skips, actual before/after capture preflight true.
App/UI/pointer, jobs, processes and suite lock were restored/cleared normally.
Code, modes, symlinks, thirteen signatures and scoped preferences/data remained
unchanged.

The original first-run wrapper report remains BLOCKED: the app root gained
com.apple.macl containing 72 zero bytes and its ctime changed, violating that
assignment's additional exact-metadata condition. The native suite result
remains PASS. No writer attribution, harmlessness or unchanged permission
semantics is claimed; no attribute was stripped or report rewritten.

A new predefined repeat-preservation observation used the prior run's actual
AFTER state, not invented metadata. It verified the stopped candidate, then
captured before-launch, after-launch/before-UI and after-About/quit/restoration
snapshots. All recorded content, signatures, xattrs, filesystem metadata and
scoped preferences/data were unchanged across all three in-boot phases. One
About case passed with both preflights true; the full suite was not rerun.
This establishes that separate repeat-preservation result, not retrospective
first-launch metadata equality or an exception to the original report.

These facts satisfy the scoped Shared behavior/unit and signed-candidate
Settings-preservation criteria. They do not claim universal filesystem
metadata invariance or live producer integration.

Explicit remaining coverage

Live Now Playing/Lunar producer exit/restart, helper reconnect and whole-app
recovery remain outside these isolated pipe and Settings checks. The unchanged
consumer cleanup boundaries and cooperative callback cancellation are
documented, not silently rewritten in this PR. Keep broader follow-up under
#7; no additional player integration, account use or whole-app coverage is
claimed.

Earlier failures, native reports and raw captures remain local and preserved.
No host app replacement, privacy grant/reset, release or notarization was
performed during this clearance.

This was referenced Oct 3, 2026
@jdylanmc
jdylanmc marked this pull request as ready for review October 4, 2026 07:11
@jdylanmc
jdylanmc merged commit 203446b into pocket Oct 4, 2026
16 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