Repository navigation
node: an administrator judges the service's own state as the service, and an unreadable state directory refuses once with its true reason - #1635
Merged
Conversation
…dministrator judges the service's own files only where nothing is written The `--raft-self` refusal told an operator who had typed `--listen-raft` that its absence was the cause. MEASURED cause: an elevated `--print-surfaces` over a healthy node's state directory, whose files NT SERVICE\FastCacheCompileNode owns. The owner judgement, made from the asking account, refused them, so no formation record shaped the line. Its mode was unknown, and the first startup row that judges a flag by the mode blamed the flag. The cause is carried, not guessed: - `ShapeByKeptFormation` is `main`'s shaping step. Where nothing can shape a configuration it records why: `NodeConfig::formationUnread`, a `FormationUnread` with the reading's own refusal and the start stage of the arm that gave up. - `FormationAbsenceOf` is the ONE sentence, printed by the `mode: none` line and by the refusal. - The raft line no longer promises a first-start mint when the record could not be read. An unread directory is refused ONCE, and by its own arm: - `main` ends a start on it FIRST (`UnreadStateStage`), ahead of the startup table. An I/O arm (a listing refused, an access list that would not answer, a record that would not decode) exits 1 and is retried by the supervisor, as before. A verdict (another account's file, an unknown entry) exits 78. - `--print-surfaces` ends by the same arm, 1 against 2. - The table's first row (`StateDirectoryUnreadRefusal`, a row whose message is a function: `ConfigRule::explain`) claims only the permanent ones. So `--raft-self`, typed `--discovery`, `--dashboard` and the closed-consensus worker never judge a mode the line does not have. - `--raft-self`'s own refusal is two rows, never one sentence: - an empty `--listen-raft=` that closed the port its mode opens; - a configuration nothing tried to shape. The trusted-owner set (owner ruling 2026-10-06, limited by the controller): - An administrator counts files, and a directory, owned by the node's OWN per-service virtual account (`NT SERVICE\<--service-name>`, through the `NodeWindowsLogon` the registration uses) as the node's own. This holds ONLY in a verb that writes nothing. - That is a column of the verbs (`StateUseRows`). `--print-surfaces` alone inspects. `--print-identity` mints an absent key and id, so it runs, as do a start and an install. - The set is one row per (caller, use) pair (`OwnStateAccountRows`), applied by one decorator, `OwnStateAccountsGuard`. It promotes a file owner, and a directory owner through the new `WritersBeyondOwner`. - The comparison is by SID (`FileOwner::id`, `AccountIdOf`), never by name, and only a per-service SID counts (`IsPerServiceSid`; `ALL SERVICES` is the group S-1-5-80-0). - A start, foreground or supervised, keeps the strict set. - POSIX is unchanged. Remedies: a refusal of another account's file or directory names the owner and the seat that would judge it as the service. Removing or moving aside is for a planted entry only. A refused listing says who can list it, with one full stop. Docs, the rule (with its blind spot: another service an administrator names on purpose is trusted by `--print-surfaces`, failing OPEN for that administrator alone), the reference YAML, the help text and an AGENT.md tripwire are updated, the last within budget. Signed-off-by: Christian Parpart <christian@parpart.family>
The guard interface gained WritersBeyondOwner in the previous commit, and the one test fake that implements it lives under `#if defined(_WIN32)`, so no Linux build and no local gate compiled it; CI's clang-cl leg refused it as an abstract class marked final. It now forwards to the production guard like every other method it does not intercept. Signed-off-by: Christian Parpart <christian@parpart.family>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Found on this machine's own installation, while redeploying it to master
4d6255fca: an administrator judging the healthy, running node's own registered line with--print-surfaceswas refused.What was wrong
0.3.0-63-g4d6255fca, elevated, over the running service's state directory:NT SERVICE\FastCacheCompileNode;mode: none;--raft-selfwith "the port comes from --listen-raft, which is also what turns consensus ON". But--listen-raftWAS on the line, and since Zero-config Windows office fleet #1600 the mode held in the state directory is what decides consensus.What changes
--listen-raft,--discovery,--dashboardor the closed-consensus worker check. It names the true reason and a remedy that is true for that reason. It is refused by the step that failed:--print-surfaces: 2).NT SERVICE\<--service-name>) as the node's own.--print-surfacestrusts them. Which verbs write is a table column;--print-identity(which can mint), a foreground start and--install-servicekeep the strict owner set.--service-name="ALL SERVICES"(the groupS-1-5-80-0) is refused, and an empty or unresolvable name trusts nothing.--service-namecomes from the command line only.--print-surfaceswrites nothing.Verification
WSL, whole binaries:
fastcache-compile-node-tests: 1452 cases, 1451 passed, 1 skipped;FastCacheTest: 3218 cases, 3211 passed, 7 skipped.Neuters: each of the six new guards was neutered in turn, and only its own cases went red.
Formatting and lint: the pinned clang-format and clang-tidy (22.1.8) are clean; a planted violation was caught. MSVC compiles the changed files clean with warnings as errors.
A Windows test runs the production SID code (
NT SERVICE\TrustedInstallerand a test file's owner).End to end on Windows, the branch built as cl-release
0.3.0-64-gd0bba3958, against the live node, whose service kept running:0.3.0-63)--print-surfaces, live linemode: none, rc 2, blames--listen-raftmode: solitary, rc 0--print-surfaces, live line