Skip to content

Commit 07cb8c9

Browse files
committed
FEATURE-ci-windows-stage-compiler: Capture bounded configure diagnostics
Retain the last actual configure check before fixture cleanup while preserving RuntimeError and installed-matrix tail visibility. Prepare a temporary manual Windows-only selector with unchanged native Windows steps; task remains In Progress pending one caller-owned native capture and proven repair. Verified real-configure RED/GREEN and over-budget diagnostics, healthy eight-case fixture, unchanged test and production-driver invariants, four workflow tests, actionlint, shell syntax, Python syntax and whitespace.
1 parent 6fc6723 commit 07cb8c9

3 files changed

Lines changed: 96 additions & 1 deletion

File tree

‎.github/workflows/v3-package-validation.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ on:
55
pull_request:
66
branches: [v3, master]
77
workflow_dispatch:
8+
# Temporary diagnostic selector; remove before merging this task into v3.
9+
inputs:
10+
windows_only:
11+
description: 'Capture Windows diagnostics; other platform jobs are skipped'
12+
type: boolean
13+
default: false
814
permissions:
915
contents: read
1016
jobs:
1117
linux:
18+
if: github.event_name != 'workflow_dispatch' || !inputs.windows_only
1219
runs-on: ubuntu-24.04
1320
timeout-minutes: 90
1421
steps:
@@ -44,6 +51,7 @@ jobs:
4451
retention-days: 14
4552
if-no-files-found: error
4653
macos:
54+
if: github.event_name != 'workflow_dispatch' || !inputs.windows_only
4755
runs-on: macos-15
4856
timeout-minutes: 90
4957
steps:
@@ -148,6 +156,7 @@ jobs:
148156
retention-days: 14
149157
if-no-files-found: error
150158
freebsd:
159+
if: github.event_name != 'workflow_dispatch' || !inputs.windows_only
151160
runs-on: ubuntu-24.04
152161
timeout-minutes: 180
153162
steps:

‎scripts/test-v3-stage-install.py‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
from pathlib import Path
55
import platform
6+
import re
67
import shlex
78
import shutil
89
import subprocess
@@ -49,7 +50,21 @@ def setUpClass(cls):
4950
'RANLIB=' + cls.shell_path(cls.build / 'native-ranlib-boundary.sh')], cwd=cls.build,
5051
env=cls.environment, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
5152
if result.returncode:
52-
raise RuntimeError(result.stdout)
53+
# Preserve the failed check before class cleanup removes config.log.
54+
try:
55+
log = (cls.build / 'config.log').read_text(errors='replace')
56+
core = log.split('## Cache variables.', 1)[0]
57+
checks = list(re.finditer(r'^configure:\d+: checking ', core, re.MULTILINE))
58+
diagnostic = core[checks[-1].start():] if checks else ''
59+
diagnostic = diagnostic.split('\nconfigure: failed program was:', 1)[0]
60+
excerpt = diagnostic.encode()
61+
# The installed matrix retains only the final 3000 output bytes.
62+
if len(excerpt) > 2000:
63+
excerpt = excerpt[:1000] + b'\n[configure check truncated]\n' + excerpt[-1000:]
64+
diagnostic = '\nLast configure check (config.log):\n' + excerpt.decode(errors='replace')
65+
except OSError as error:
66+
diagnostic = '\nCannot read fixture config.log: ' + str(error)
67+
raise RuntimeError(result.stdout + diagnostic)
5368
cls.installer = cls.build / 'native-install-boundary.sh'
5469
# A tiny real library reaches Automake/libtool's archive and DLL install
5570
# paths without compiling the unrelated protocol engines in each fixture.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# FEATURE-ci-windows-stage-compiler: retain the native fixture compiler diagnostic
2+
3+
Status: In Progress — diagnostic checkpoint ready; native compiler cause and repair pending.
4+
Base: `v3` at `6fc672326b9cad8f4aa068b9641fc03e21218e31`.
5+
6+
The fresh native Windows package job `120607477636` and archive job
7+
`120608161470` reach the fixture's C compiler check, then report that the compiler
8+
cannot create executables. The fixture's configure stdout omits the actual
9+
compiler/linker stderr, and class cleanup removes its temporary `config.log`.
10+
The existing Windows package artifact `12526449139` retains the successful outer
11+
configure log, but not the failing inner fixture log. The native cause is unknown.
12+
13+
The first checkpoint reports the last actual configure check before cleanup,
14+
excluding cache/output-variable sections and the failed source dump. Long check
15+
output retains its first and last 1000 bytes with a truncation marker. This keeps
16+
the command and diagnostic near the end of the exception for the installed
17+
matrix's final-3000-byte error report. Configure failure still raises
18+
`RuntimeError`, and normal temporary-directory cleanup still runs.
19+
20+
Action items:
21+
22+
- [x] Read primary CLAUDE.md/AGENTS.md, saved plan, literal journal, complete fixture,
23+
existing workflow, and retained outer Windows configure/command context.
24+
- [x] Create the isolated Groundwork worktree from the exact v3 base; preserve
25+
unrelated work.
26+
- [x] Prove RED with actual configure and a deterministic invalid clang option:
27+
compiler stderr exists in `config.log` but is absent from the original exception.
28+
- [x] Add bounded failure reporting before cleanup; preserve the original failure.
29+
- [x] Prove GREEN with actual configure, including an over-budget real compiler
30+
diagnostic; retain compiler command/stderr in the final 3000 output bytes.
31+
- [x] Preserve all eight original test-method ASTs, configured `D:/ci/prefix`, MSYS
32+
shell/path handoffs, real libtool operations, and production Makefile drivers.
33+
- [x] Run the healthy eight-case fixture and affected syntax/workflow checks.
34+
- [x] Prepare a temporary branch-only `windows_only` manual dispatch input in the
35+
existing package workflow; keep the Windows job and normal push/PR behavior
36+
unchanged. The three other jobs are explicitly skipped for that selection.
37+
- [ ] Caller: review checkpoint, publish only this task branch, and dispatch one
38+
manual Windows-only native control using `windows_only=true`.
39+
- [ ] Read the actual native diagnostic and adjudicate the cause. If the control
40+
passes, record intermittency/uncertainty and stop; do not retry unchanged.
41+
- [ ] Resume this same task for a proven minimal repair with relevant TDD.
42+
- [ ] Remove every temporary workflow change, restoring the exact base workflow
43+
before final validation and merge into v3.
44+
- [ ] Caller: complete required Groundwork validation and finalization.
45+
46+
Checkpoint verification:
47+
48+
- Bootstrap passes with the existing .PHONY / AC_OUTPUT warnings.
49+
- Original healthy fixture: all 8 tests pass in 19.173s.
50+
- Actual-configure RED fails because the emitted exception omits clang's
51+
`unknown argument` diagnostic; the original `RuntimeError` and cleanup are
52+
observed. GREEN retains the actual command and compiler stderr in the final
53+
3000 bytes; the same proof with 80 invalid options verifies bounded truncation.
54+
- Changed healthy fixture: all 8 tests pass in 20.183s.
55+
- Python syntax, original eight test ASTs, unchanged setup outside failure
56+
reporting, unchanged MSYS handoffs and production driver bytes pass.
57+
- All 4 existing package workflow tests pass. Actionlint 1.7.7 passes with its
58+
optional shellcheck integration disabled (shellcheck is unavailable locally).
59+
`bash -n` passes for all 18 existing shell step bodies. Parsed workflow
60+
comparison confirms the entire Windows job, action pins, privileges and normal
61+
workflow are unchanged apart from the temporary dispatch/job selectors.
62+
- `git diff --check` passes. CLAUDE.md's C++ cpplint does not apply to these Python,
63+
YAML and task-record changes; no Python linter is documented.
64+
65+
Evidence and the task-local executable probes are retained in the primary
66+
checkout at `.debug/ci-windows-stage-compiler-lbpdh7hb/implementation/`; the literal
67+
journal is `.debug/ci-windows-stage-compiler-lbpdh7hb/journal.md`.
68+
No native Windows execution, compiler/flag/runtime repair, full validation,
69+
publication or merge is claimed at this checkpoint. Native capture, the accepted
70+
repair, workflow restoration and final checks remain incomplete. Other platform
71+
failures and earlier bounded investigations are outside this checkpoint.

0 commit comments

Comments
 (0)