[CLAUDE] Docs: S152 closeout — bookend hình B trọn 2 đầu + owner (30)(31)(32) + queue memory-ops TRỌN (squash 20 wal:)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m30s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m30s
- Owner 3-quyết: (30) JUMP để-nguyên-theo-nhịp · (31) 4 persona +NEVER-block (restart ĐÃ THOẢ) · (32) vòng 1→5 AUTO — lô consent gỡ 9 site (5 H1 + ring1-tự-bắt + 3 trio; E-013 EXT) - Memory-ops TRỌN: A1-A4/D1/D2/R1/B-series — A7 392/392 · mfe 20/20-100% lần đầu · lead-gap drain 24.728→16.485B · strike-ledger + WARN-latch (-Ack = owner-action) - V4 sleep AUTO đầu: 1 shard thật/16 KÊU · ring4 đầu-đời TRƯỢT-4/5 → 4 fix gist (scribe sub-ring4-close vì return-only) - Thư model re-stamp: 59ce1d0f → 9c909007 published (G-024a) — adap-report Đính-chính @S152 + sweep 13 bề-mặt LIVE - Bookend @close: stale 6 FLAG + gap 2 FLAG → vá 8/8; ring2 8/8 ĐẠT (4-A pin-bản-cắt → slot 33) · ring1 48Đ/5T/59-claim - M9 13 đơn-vị diary (3 S151-deep hồi-tố) · #53 ×10-chắc → tally 60-cận-dưới + errata subject-1b85713 - Session-log 2 run= + completeness-gate 5-vòng ĐẠT · HANDOFF segment S152 (carry 3-đóng/3-mới/23-giữ; slot 33/34) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@ -29,6 +29,8 @@ param(
|
||||
[string]$RepoRoot = "$PSScriptRoot\..",
|
||||
[ValidateSet('lead','sub','all')] [string]$Tier = 'all',
|
||||
[switch]$Judge = $false,
|
||||
[switch]$Detail = $false, # @S152 owner#32: per-item L1-presence - print each MISSed denominator item by name
|
||||
[switch]$Ack = $false, # @S152 B4: acknowledge current strikes -> resets the GOODHART-WARN latch baseline
|
||||
[datetime]$Today = (Get-Date)
|
||||
)
|
||||
|
||||
@ -189,22 +191,43 @@ function Measure-Lead {
|
||||
Write-Host ""
|
||||
|
||||
# --- Goodhart anchor : print recurring-error reality next to coverage ---
|
||||
$lastStrikes = -1
|
||||
if (Test-Path $statePath) { try { $lastStrikes = [int]((Get-Content $statePath -Raw -Encoding UTF8 | ConvertFrom-Json).strikes_total) } catch { } }
|
||||
$lastStrikes = -1; $warnBase = -1; $histOld = @()
|
||||
if (Test-Path $statePath) {
|
||||
try {
|
||||
$stOld = Get-Content $statePath -Raw -Encoding UTF8 | ConvertFrom-Json
|
||||
$lastStrikes = [int]$stOld.strikes_total
|
||||
if ($stOld.PSObject.Properties.Name -contains 'warn_baseline') { $warnBase = [int]$stOld.warn_baseline }
|
||||
if ($stOld.PSObject.Properties.Name -contains 'history') { $histOld = @($stOld.history) }
|
||||
} catch { }
|
||||
}
|
||||
# B4 @S152 LATCH: WARN compares against a PERSISTED warn_baseline that only moves on -Ack.
|
||||
# Old behavior compared to the immediately-previous run then overwrote state -> the
|
||||
# measuring run CONSUMED its own warning (S152 eval S6: audit re-ran mfe minutes later,
|
||||
# WARN already silent). Migration: no warn_baseline key yet -> seed from pre-B4
|
||||
# strikes_total (old file) or from the current count on a truly fresh state; the seed
|
||||
# itself never fires (baseline opens the ledger, it is not a rise).
|
||||
if ($warnBase -lt 0) { $warnBase = if ($lastStrikes -ge 0) { $lastStrikes } else { $strikesTotal } }
|
||||
if ($Ack) { $warnBase = $strikesTotal }
|
||||
Write-Host "[LEAD] Goodhart anchor (NO self-grading - real recurring-error signal):"
|
||||
Write-Host " error-ledger: strikes_total=$strikesTotal RCA_entries=$rcaCount AS-classes=$($asIds.Count)"
|
||||
if ($lastStrikes -ge 0 -and $strikesTotal -gt $lastStrikes -and $fits) {
|
||||
Write-Host " GOODHART-WARN: strikes rose ($lastStrikes -> $strikesTotal) while set still FITS -> coverage may LIE (set 'fits' but errors recur = not actually applied)"
|
||||
if ($Ack) {
|
||||
Write-Host " (ACK: warn-baseline set to $strikesTotal - future WARN fires only when strikes exceed this)"
|
||||
} elseif ($strikesTotal -gt $warnBase -and $fits) {
|
||||
Write-Host " GOODHART-WARN (LATCHED): strikes rose ($warnBase -> $strikesTotal) while set still FITS -> coverage may LIE. Repeats every run until acknowledged via -Ack."
|
||||
} else {
|
||||
Write-Host " (rule: if strikes rise across runs while coverage stays high -> the score lies. last_run_strikes=$lastStrikes)"
|
||||
Write-Host " (rule: if strikes rise across runs while coverage stays high -> the score lies. warn-baseline=$warnBase last_run_strikes=$lastStrikes)"
|
||||
}
|
||||
# persist strikes for cross-run compare (MFE state only; does NOT touch token_governor)
|
||||
# Write LF + UTF8-no-BOM explicitly (erratum EOL 2026-07-16 lo #6 point-of-generation floor, S129):
|
||||
# PS5.1 Set-Content -Encoding UTF8 wrote BOM+CRLF -> worktree CRLF churn AND a 3-byte BOM in the
|
||||
# committed blob. Reader at line 193 pins -Encoding UTF8 in the SAME commit (no BOM-sniff dependency).
|
||||
try {
|
||||
$st = @{ strikes_total = $strikesTotal; rca_entries = $rcaCount; at = $Today.ToString('yyyy-MM-dd') }
|
||||
$json = (($st | ConvertTo-Json) -replace "`r`n", "`n") + "`n"
|
||||
# B4 @S152: history[] = append-unbounded BY DESIGN (absence-of-entry = never-happened
|
||||
# stays a safe read; if a FIFO cap is ever added, eviction MUST be explicit -
|
||||
# log-BOUNDED design-note dede7ec5). ack_strikes persists the WARN-latch baseline.
|
||||
$histNew = @($histOld) + ,(@{ at = $Today.ToString('yyyy-MM-dd HH:mm'); strikes_total = $strikesTotal; rca_entries = $rcaCount })
|
||||
$st = [ordered]@{ strikes_total = $strikesTotal; rca_entries = $rcaCount; at = $Today.ToString('yyyy-MM-dd'); warn_baseline = $warnBase; history = $histNew }
|
||||
$json = (($st | ConvertTo-Json -Depth 5) -replace "`r`n", "`n") + "`n"
|
||||
[System.IO.File]::WriteAllText($statePath, $json, (New-Object System.Text.UTF8Encoding($false)))
|
||||
} catch { }
|
||||
Write-Host ""
|
||||
@ -258,6 +281,12 @@ function Measure-Sub {
|
||||
if ($diaryFold -match ('(?<![a-z0-9])' + [regex]::Escape($words[0]) + '(?![a-z0-9])')) { $matched = $true }
|
||||
}
|
||||
if ($matched) { $hit++ }
|
||||
elseif ($Detail) {
|
||||
# per-item L1-presence probe (owner #32 @S152): name the missing item so the
|
||||
# reinject lane acts per-item instead of re-deriving the matcher by hand.
|
||||
$short = if ($item.Length -gt 100) { $item.Substring(0, 100) } else { $item }
|
||||
Write-Host (" MISS: {0}" -f $short)
|
||||
}
|
||||
}
|
||||
$den = $denom.Count
|
||||
if ($den -eq 0) {
|
||||
|
||||
Reference in New Issue
Block a user