Skip to content

Commit 8f533aa

Browse files
committed
[WINA-2940] Cut the bounds comments back to the wrong-fix facts
The previous commit answered the review question in the source instead of in the PR description: a 57-extension count from one debugging session, why the cap is where it is, and a test-function cross-reference. That is the kind of comment this PR has already been trimmed for once, and the reasoning is in the description where it does not rot. What survives is the fact deleting it would invite a wrong fix - that the two name caps bound different sources, so they are not two spellings of one number waiting to be unified. 17.2% comment lines back to 15.8%, against 15.6% before the change. Comment-only: stripping comment lines from both revisions leaves the file identical. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 25a1ca4 commit 8f533aa

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

comp/logonduration/impl/grouppolicy.go

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ import (
2727
// discarded there long after the send returned nil. A worst-case-size test derives one
2828
// byte budget from all four.
2929
const (
30-
// maxCSEInvocationsPerScope bounds the invocations one pass reports: one per
31-
// extension, and a stock Windows 11 registers 57 of them under Winlogon\GPExtensions,
32-
// which third-party extensions add to. So this is a backstop with little headroom
33-
// rather than an unreachable ceiling, and what it drops is reported per scope in
34-
// ComputerCSEsOmitted / UserCSEsOmitted.
30+
// maxCSEInvocationsPerScope is a backstop: one invocation per extension per pass.
3531
maxCSEInvocationsPerScope = 64
3632

3733
// maxGPOsPerCSE bounds the GPO references carried by one invocation. GPOs are
@@ -40,14 +36,9 @@ const (
4036
// GPOsOmitted.
4137
maxGPOsPerCSE = 32
4238

43-
// maxCSENameBytes bounds a name the provider registers rather than one anybody
44-
// chose: the longest of those 57 is 38 characters.
39+
// The name caps differ because their sources do: a CSE name is provider-registered
40+
// and fixed, a GPO display name is chosen in AD, 256 characters at two bytes each.
4541
maxCSENameBytes = 128
46-
47-
// maxGPONameBytes bounds a display name chosen in AD, where 256 characters is the
48-
// ceiling, so this carries one whole at two bytes per character - the boundary
49-
// TestGPONamesSurviveNonLatinScripts pins. A name in a three-byte script is cut on
50-
// a UTF-8 boundary instead, which is why the character figure need not be exact.
5142
maxGPONameBytes = 512
5243
)
5344

@@ -285,8 +276,7 @@ func (a *gpAccumulator) finalize(tl BootTimeline) *GroupPolicyDetails {
285276
}
286277
}
287278

288-
// buildScope converts the invocations belonging to one boot pass, reporting how many
289-
// the invocation cap cut.
279+
// buildScope converts the invocations belonging to one boot pass, with the count the cap cut.
290280
func (a *gpAccumulator) buildScope(scope gpScope, offsetOf func(time.Time) int64) ([]CSEInvocation, int) {
291281
if !a.passPinned[scope] {
292282
return nil, 0

0 commit comments

Comments
 (0)