Skip to content

Commit 9263beb

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix-issue5053
2 parents 4863874 + fd3c303 commit 9263beb

41 files changed

Lines changed: 1207 additions & 362 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/scripts/configure-windows-test-host.ps1

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,30 @@ if ($env:GITHUB_STEP_SUMMARY) {
134134
}
135135
}
136136

137-
[string[]]$exclusionPaths = @($exclusions | ForEach-Object { $_.Path })
138-
if ($exclusionPaths.Count -gt 0) {
139-
Add-MpPreference -ExclusionPath $exclusionPaths -ErrorAction Stop
137+
$defenderService = Get-Service -Name "WinDefend" -ErrorAction SilentlyContinue
138+
if (-not $defenderService -or $defenderService.Status -ne "Running") {
139+
$defenderServiceStatus = if ($defenderService) { $defenderService.Status } else { "unavailable" }
140+
Write-Warning "Windows Defender service is $defenderServiceStatus; skipping exclusion configuration and verification."
140141
}
142+
else {
143+
try {
144+
[string[]]$exclusionPaths = @($exclusions | ForEach-Object { $_.Path })
145+
if ($exclusionPaths.Count -gt 0) {
146+
Add-MpPreference -ExclusionPath $exclusionPaths -ErrorAction Stop
147+
}
141148

142-
$prefs = Get-MpPreference
143-
foreach ($entry in $exclusions) {
144-
if ($prefs.ExclusionPath -notcontains $entry.Path) {
145-
throw "Windows Defender exclusion was not applied: $($entry.Path)"
149+
$prefs = Get-MpPreference -ErrorAction Stop
150+
foreach ($entry in $exclusions) {
151+
if ($prefs.ExclusionPath -notcontains $entry.Path) {
152+
throw "Windows Defender exclusion was not applied: $($entry.Path)"
153+
}
154+
}
155+
}
156+
catch {
157+
if ($_.Exception.Message -notmatch "(?i)0x800106ba") {
158+
throw
159+
}
160+
161+
Write-Warning "Windows Defender service became unavailable during exclusion configuration; continuing without exclusions."
146162
}
147163
}

AGENT_GUIDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ CI watching must be bounded. Do not loop indefinitely.
139139
- `status --check` repair actions are structured by `name`, `action`, `args`, `mutation_class`, `safety_class`, and `safety_notes`. Preserve compatibility `reason` as the first trigger and ordered `reasons` as the complete trigger set. Deduplicate only exact structured identities; different targets, options, actions, mutation classes, or safety semantics must remain distinct. JSON and human output must use the same deduplicated order. Human output must preserve platform-aware shell quoting, visibly escape control characters to keep each repair action on one diagnostic line, and leave structured JSON `args` unchanged.
140140
- `maintenance_guidance.fts_optimization` is the shared, read-only recommendation contract for status, explain, optimize preview, and optimize execution. Keep `recommended`, `action`, `reason`, `threshold_writes`, `observed_writes`, and `state` synchronized; stale or unavailable snapshots must not recommend mutation.
141141
- A valid CLI `status --stale-after <duration>` implies the workspace check. Check-mode JSON includes `query_context.check_mode` (`explicit` or `implied_by_stale_after`) and `query_context.stale_after_seconds`; ordinary status JSON omits `query_context`.
142+
- Every bounded `workspace_check` path list (`changed_files`, `missing_files`, `outside_sparse_cone_files`, `unindexed_files`, `unverifiable_files`, and `scan_errors`) carries an authoritative count plus matching `*_truncated`, `*_path_limit`, and `*_omitted_count` fields. List-only `--fields` projections must retain those signals automatically; compact output retains the signals without path arrays; and `--max-json-bytes` may remove only trailing paths while updating both the per-list omitted count and the envelope byte-limit signal. Human check diagnostics must label each displayed list as a sample or complete.
142143
- `status --explain` derives accepted top-level keys from the same source-generated `StatusResult` serializer metadata as `status --json`, excludes ignored properties, and supports bounded dot-separated member paths without reading runtime values. Major readiness, trust, extension, maintenance, and cap-hit sections return structured meaning, source, dependencies, interpretation, and repair guidance; unknown input is sanitized and returns bounded valid candidates. Bounded status explain envelopes also omit database paths, timings, indexed HEADs, and stable-at timestamps.
143144
- `database_size_attribution` is part of the synchronized status contract. Preserve its read-only main/WAL/SHM separation; exact logical reconciliation across object, freelist, and unexplained-residual bytes; table/index and page-type subtotals; 20-object/128-character sanitized bounds; and explicit `available=false` / stable `unavailable_reason` behavior without zero-valued unavailable object metrics.
144145
- Explicit WAL truncate-checkpoint diagnostics must preserve SQLite's `(busy, log, checkpointed)` result, treat non-zero `busy` or positive remaining pages as unsuccessful with bounded machine reasons, accept `(0, -1, -1)` as the successful non-WAL no-op, and never expose raw exception text or paths.

0 commit comments

Comments
 (0)