GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs(fspy): document shared-memory facade ownership semantics by wan9chi · Pull Request #521 · voidzero-dev/vite-task

Conversation

@wan9chi

@wan9chi wan9chi commented Jul 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Motivation

Define how shared-memory owners and opened views behave before replacing the platform backends.

Changes

  • Documents the behavior of create, open, owner drop, and opened-view lifetime.
  • Changes open to take only the identifier and derive the mapped size from the operating-system object.
  • Removes the redundant shared-memory size from ChannelConf.
  • Explains that Windows may keep a section name openable after owner drop.
  • Explains how the channel lock file prevents late sender creation on every platform.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@wan9chi Graphite App

wan9chi commented Jul 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author
  • perf(fspy): use sparse Windows shared memory #524 Graphite: 2 dependent PRs (#525 Graphite, #526 Graphite)
  • fix(fspy): use memfd for Linux shared memory #523 Graphite
  • test(e2e): reproduce constrained dev shm failure #522 Graphite
  • docs(fspy): document shared-memory facade ownership semantics #521 Graphite 👈 (View in Graphite)
  • refactor(fspy): introduce fspy_shm facade #520 Graphite
  • main

This stack of pull requests is managed by Graphite. Learn more about stacking.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Jul 9, 2026
refactor(fspy): introduce fspy_shm facade #520
Merged
test(e2e): reproduce constrained dev shm failure #522
Merged
fix(fspy): use memfd for Linux shared memory #523
Merged
perf(fspy): use sparse Windows shared memory #524
Merged
perf(fspy): use sparse Windows shared memory #525
Closed
refactor(fspy): own macOS shared-memory mapping #526
Merged
@wan9chi
wan9chi force-pushed the fspy-shm-lifecycle branch from 7121ef2 to e1d4fa0 Compare July 9, 2026 05:12
@wan9chi
wan9chi force-pushed the fspy-shm-facade branch 2 times, most recently from 3d5e984 to 9ca03e0 Compare July 9, 2026 05:22
@wan9chi
wan9chi force-pushed the fspy-shm-lifecycle branch from e1d4fa0 to 1e4ee5f Compare July 9, 2026 05:22
@wan9chi
wan9chi force-pushed the fspy-shm-facade branch from 9ca03e0 to 89d699a Compare July 9, 2026 05:35
@wan9chi
wan9chi force-pushed the fspy-shm-lifecycle branch from 1e4ee5f to 67ee808 Compare July 9, 2026 05:35
@wan9chi
wan9chi marked this pull request as ready for review July 9, 2026 05:41
wan9chi
wan9chi commented Jul 9, 2026
View reviewed changes
Comment thread crates/fspy_shm/src/lib.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@wan9chi
wan9chi force-pushed the fspy-shm-facade branch from 89d699a to 4f7087d Compare July 9, 2026 07:57
@wan9chi
wan9chi force-pushed the fspy-shm-lifecycle branch from 67ee808 to 669ab52 Compare July 9, 2026 07:57
@wan9chi
wan9chi changed the base branch from fspy-shm-facade to graphite-base/521 July 9, 2026 14:10
@wan9chi
wan9chi force-pushed the graphite-base/521 branch from 4f7087d to cb580c2 Compare July 9, 2026 14:15
@wan9chi
wan9chi force-pushed the fspy-shm-lifecycle branch from 669ab52 to 70822fb Compare July 9, 2026 14:15
@graphite-app
graphite-app Bot changed the base branch from graphite-base/521 to main July 9, 2026 14:16
@wan9chi
wan9chi force-pushed the fspy-shm-lifecycle branch from 70822fb to 8716c77 Compare July 9, 2026 14:16
@wan9chi
wan9chi marked this pull request as draft July 10, 2026 01:16
@wan9chi @claude
docs(fspy): document shared-memory facade ownership semantics
4e0e749
Document the cross-platform create/open contract of the fspy_shm facade:
owner lifetime gates new opens, already-open views survive owner teardown,
and Windows may keep the name resolvable while other handles hold the
section object alive.

Co-Authored-By: Claude Fable 5 <[email protected]>
@wan9chi
wan9chi force-pushed the fspy-shm-lifecycle branch from 8716c77 to 4e0e749 Compare July 10, 2026 06:02
@wan9chi wan9chi changed the title refactor(fspy): add shared-memory service lifecycle docs(fspy): document shared-memory facade ownership semantics Jul 10, 2026
@wan9chi
wan9chi marked this pull request as ready for review July 10, 2026 07:36
@wan9chi @codex
docs(fspy): describe shared memory API semantics
1981c35
Co-authored-by: GPT-5 Codex <[email protected]>
@wan9chi
wan9chi marked this pull request as draft July 10, 2026 15:00
@wan9chi @codex
docs(fspy): simplify shared memory API wording
7da9688
Co-authored-by: GPT-5 Codex <[email protected]>
wan9chi and others added 5 commits July 10, 2026 23:52
@wan9chi @codex
docs(fspy): remove hard wraps from shared memory README
d9a54d0
Co-authored-by: GPT-5 Codex <[email protected]>
@wan9chi @codex
docs(fspy): use README for crate documentation
866b745
Co-authored-by: GPT-5 Codex <[email protected]>
@wan9chi @codex
refactor(fspy): derive shared memory size when opening
0b00f62
Co-authored-by: GPT-5 Codex <[email protected]>
@wan9chi @codex
docs(fspy): format crate name in README heading
61f72d8
Co-authored-by: GPT-5 Codex <[email protected]>
@wan9chi @codex
docs(fspy): keep shared memory API description abstract
2b0d301
Co-authored-by: GPT-5 Codex <[email protected]>
@wan9chi
wan9chi marked this pull request as ready for review July 10, 2026 23:32
@wan9chi
wan9chi merged commit 53345ce into main Jul 10, 2026
16 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@wan9chi Graphite App

wan9chi commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Merge activity

  • Jul 10, 11:36 PM UTC: @wan9chi merged this pull request with Graphite.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@wan9chi
wan9chi deleted the fspy-shm-lifecycle branch July 10, 2026 23:36
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 10, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b0d301fbe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread crates/fspy_shared/src/ipc/channel/mod.rs
lock_file.try_lock_shared()?;

let shm = fspy_shm::open(&self.shm_id, self.shm_size)?;
let shm = fspy_shm::open(&self.shm_id)?;

@chatgpt-codex-connector chatgpt-codex-connector Bot Jul 10, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the original channel capacity when opening senders

On Windows, opening without the original capacity lets shared_memory recompute the opened view length from the OS mapping, which is page-rounded, while the receiver's owner still reports the requested channel(capacity) length. For non-page-aligned capacities, a sender can therefore use a larger shm.len() for ShmWriter bounds checks and advance the shared header past the receiver's slice, so ReceiverLockGuard::iter_frames can panic when it slices content[..content_size] after enough writes. Keep the configured size in ChannelConf or clamp opened views to the requested capacity.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@wan9chi wan9chi mentioned this pull request Jul 14, 2026
chore: bump vite-task to 4003f65 voidzero-dev/vite-plus#2167
Merged
wan9chi added a commit to voidzero-dev/vite-plus that referenced this pull request Jul 15, 2026
@wan9chi @claude
chore: bump vite-task to 4003f65 (#2167)
8ea4145
Bumps the `vite-task` git dependency from `cb580c2` to `4003f65`.

## Changes

The delta is entirely internal `fspy` (file-access tracking)
shared-memory work — no user-facing CLI flags, config fields, or
behavior changes, so no docs updates were needed.

- **fix(fspy):** use `memfd` for Linux shared memory — automatic
file-access tracking on Linux now works in containers and Kubernetes
runners with limited `/dev/shm` space
([#523](voidzero-dev/vite-task#523),
[#353](voidzero-dev/vite-task#353))
- **perf(fspy):** use sparse Windows shared memory — Windows file-access
tracking now uses sparse temporary backing files where supported,
avoiding upfront allocation of the full backing file on disk
([#524](voidzero-dev/vite-task#524))
- **refactor(fspy):** own macOS shared-memory mapping
([#526](voidzero-dev/vite-task#526))
- **docs/test(fspy):** document shared-memory facade ownership semantics
([#521](voidzero-dev/vite-task#521)); reproduce
constrained dev shm failure
([#522](voidzero-dev/vite-task#522))

The lockfile change reflects this refactor: `fspy` now pulls in `memfd`
and drops `shared_memory`.

## Validation

- `cargo check --workspace` passes — the new `vite-task` compiles
cleanly, confirming no breaking changes on the consuming side (including
`vite_cli_snapshots`, which compiles against vite-task's PTY/snapshot
test crates).
- vite-plus crate tests pass. (One pre-existing, environment-specific
stack overflow in `vite_global_cli`'s
`unknown_argument_detected_with_pass_as_value_hint` clap-parsing test
reproduces identically on `main` and is unrelated to this bump.)
- PTY snapshot output is unchanged by the bump; the remaining local
snapshot diffs in this sandbox are all environmental (no built
`packages/cli/dist`, plus registry TLS/network restrictions), left to
CI, which builds the JS CLI and has registry access.

## Changelog

Full vite-task CHANGELOG diff:
``https://github.com/voidzero-dev/vite-task/compare/cb580c214bb2314fc1f633a3812782c9b3a1d956...4003f65a3e5e3d957ff81b157e85e6ee41cc59fc#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed``

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
_Generated by [Claude
Code](https://claude.ai/code/session_01YERo1yECf81w37US2Gqnow)_

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@wan9chi
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.