Skip to content

0.22.0: a node has one identity however it was reached; a closed attenuation gives its place back - #47

Merged
Sunrisepeak merged 2 commits into
mainfrom
fix/one-identity-and-returned-grants
Nov 12, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
fix/one-identity-and-returned-grants

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Platform side of mcpp-language-server #86 — items P1 and W4 of its design.

A node has one identity, however it was reached (P1)

kal_fs_info and kal_fs_file_info report an identity of two words: the volume's serial number and the file's index. The first word came from two places:

  • by handle (fill): FileFsVolumeInformation's serial number — 32 bits;
  • by name, where the system has Windows 11 24H2's FileStatBasicInformation (info_by_name, 0.19.0): that record's VolumeSerialNumber — the 64 bits the file system keeps.

On builds 26100 and later every file therefore had two identities: one for the open file, another for its name. clangd (as an ok image under okrun) keys the files it has entered by identity; its include analysis asked for a header by its resolved name, got the other identity, and ended by an illegal instruction on every module unit that includes a library header — on Windows 11 24H2 alone. The engine's own probe had been printing "an open file is not the node its name refers to" on those machines.

The handle's word is the identity's (what every earlier system gives for a name too, and what a listing gives). The record's word is translated to it through a small table learned by opening one node of each volume: the first enquiry by name of a volume is answered by opening, every later one is one request again. Nothing is assumed about how the 64 bits relate to the 32.

A closed attenuation gives its place back (W4)

rights.cpp keeps 64 roots for the life of the program; forget() released what a root had listed and kept the root. A program that grants three read-only directories to each program it starts (mcppls and its engine) was refused its 22nd start with kal_err_no_memory, with every earlier grant closed. A root that keeps no record now gives its place back at its last close; a recorded root still holds it until the program ends (its record is ended there). The 64 bound what is held at once.

Tests and CI

  • tests/one_identity_for_a_node.cpp, tests/attenuation_returns_its_place.cpp.
  • A windows-2025 row (build 26100) in conformance: the only hosted system the first test can fail on.
  • The first commit carries the tests and the row without the correction, so its run is the negative control; the second carries the correction, README and 0.22.0.

Sunrisepeak and others added 2 commits November 12, 2026 18:04
…ttenuation gives its place back; CI on build 26100

The two tests state what mcpp-language-server issue 86 found from three
packages away: on Windows 11 24H2 an open file and its name had two
identities, and the 65th directory attenuation of a program was refused
however many had been closed. They are committed before the correction so that
the run on this commit shows each failing where it should: the first on the
windows-2025 row alone (build 26100, the system with the record a name is
answered by), the second on every row.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…nuation gives its place back

An identity's first word is the volume's serial number. A handle was asked
FileFsVolumeInformation (32 bits); a name, where the system has Windows 11
24H2's FileStatBasicInformation, was given that record's serial number (the 64
bits the file system keeps). On builds 26100 and later an open file and its
name were two nodes, and so were a listing's entry and an enquiry's answer: the
specification's own case "what a listing gives of a file is what an enquiry
gives" fails there, which the run on the commit before this one shows -- no row
ran on that build until now. The handle's word is the identity's; the record's
is translated to it through what is learned by opening one node of each volume.

The rights table kept 64 roots for the life of the program and returned none:
the 65th attenuation was refused whatever had been closed (the same run:
"attenuation 65 -> 4" on every row). A root that keeps no record gives its
place back at its last close.

Found as mcpp-language-server issue 86.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
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