refactor: align integration submodule paths

This commit is contained in:
Dandaedre 2026-09-15 23:58:12 +02:00
parent e62846177b
commit e8d67091da
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
11 changed files with 64 additions and 54 deletions

6
.gitmodules vendored
View File

@ -1,13 +1,13 @@
[submodule "beffroi-reports"]
path = beffroi-reports
path = reports
url = https://proxy.dandaedre.com/gitea/Beffroi/beffroi-reports.git
[submodule "reportist"]
path = reportist
path = reporter
url = https://proxy.dandaedre.com/gitea/Beffroi/reportist.git
[submodule "win-diagnostics"]
path = win-diagnostics
path = diagnostics
url = https://proxy.dandaedre.com/gitea/Beffroi/win-diagnostics.git
[submodule "references/WinDiagnostics"]

View File

@ -17,17 +17,17 @@ combination has been verified. Do not follow remote HEAD automatically.
Component task details and handoffs are maintained in:
- [Win Diagnostics tracker](win-diagnostics/AGENTS-TASKS.md)
- [Reportist tracker](reportist/AGENTS-TASKS.md)
- [Beffroi Reports tracker](beffroi-reports/AGENTS-TASKS.md)
- [Win Diagnostics tracker](diagnostics/AGENTS-TASKS.md)
- [Reportist tracker](reporter/AGENTS-TASKS.md)
- [Beffroi Reports tracker](reports/AGENTS-TASKS.md)
Keep cross-repository milestones here consistent with those component checklists.
- The three destination components contain instructions, READMEs, and Jenkins
scaffolding; the new pipeline is not implemented yet.
- Current submodule paths are `win-diagnostics/`, `beffroi-reports/`, and
`reportist/`. The integration instructions target `diagnostics/`, `reports/`,
and `reporter/`; the path migration remains a separate task.
- The initial submodule paths were `win-diagnostics/`, `beffroi-reports/`, and
`reportist/`; P5.1 later aligned them to `diagnostics/`, `reports/`, and
`reporter/`.
- Legacy sources are pinned under `references/WinDiagnostics/` and
`references/typist_reporter/` (the latter spelling is the actual local path).
- Root CI initializes pinned submodules and checks workspace files. Component
@ -124,7 +124,7 @@ machine; automated draft content remains distinct from reviewed analysis.
Depends on a working end-to-end slice from Passes 2–4. Work in beffroi-reporting.
- [ ] P5.1 Align submodule paths with `diagnostics/`, `reports/`, `reporter/`; update `.gitmodules`, documentation, scripts, and CI together, preserving pinned revisions and local work.
- [x] P5.1 Align submodule paths with `diagnostics/`, `reports/`, `reporter/`; update `.gitmodules`, documentation, scripts, and CI together, preserving pinned revisions and local work.
- [x] P5.2 Add bootstrap to initialize pinned submodules, check actual tool/platform dependencies, explain missing requirements, and prepare workspace directories without silent system modifications.
- [x] P5.3 Add high-level workflow commands based on the component CLIs for collection, offline analysis, draft report generation, rendering, and a complete incident run. Keep implementation in components.
- [x] P5.4 Add an integration test: sanitized capture → analysis → diagnostic artifact → report adapter → report input → Reportist → PDF. Validate schemas, expected evidence/findings, and PDF output; use isolated temporary outputs.
@ -152,6 +152,19 @@ reports remain understandable/recreatable and individual tools need no macro rep
## Pass handoff log
### 2026-09-15 — Integration workspace layout complete
- Completed P5.1 and therefore Pass 5 by moving the active pinned submodules to
`diagnostics/`, `reports/`, and `reporter/`. Component repository names and
remote URLs remain unchanged; reference submodules remain under `references/`.
- Updated bootstrap, workflow commands, component checks, legacy baseline paths,
documentation links, and CI-facing scripts together. No component implementation
was copied into the integration repository.
- Validation target: exact-pin bootstrap check, 64 component tests, complete
capture-to-PDF workflow, and a clean recursive-clone reproduction.
- Next: continue explicitly scoped component/native-platform or historical-data
work from Pass 6; the reproducible integration workspace pass is complete.
### 2026-09-15 — FreeBSD adapter publication fix
- Pinned beffroi-reports with a FreeBSD-safe `publish_exclusive`: native

View File

@ -6,14 +6,11 @@ It brings the complete environment together as Git submodules:
```text id="8efkt6"
beffroi-reporting
├── win-diagnostics/
├── beffroi-reports/
└── reportist/
├── diagnostics/ → win-diagnostics
├── reports/ → beffroi-reports
└── reporter/ → reportist
```
The target layout uses `diagnostics/`, `reports/`, and `reporter/` respectively.
Renaming the current submodule paths is tracked in the migration roadmap.
During migration, the previous implementations are also available under `references/` so developers and agents can inspect the complete old and new workflows from one workspace.
The target pipeline is:
@ -21,15 +18,15 @@ The target pipeline is:
```text id="z3j03k"
Windows
↓
win-diagnostics
diagnostics/ (win-diagnostics)
↓
diagnostic.json
↓
beffroi-reports
reports/ (beffroi-reports)
↓
report.yaml
↓
reportist
reporter/ (reportist)
↓
PDF
```
@ -157,8 +154,8 @@ repository ownership and rules for agents working across the workspace.
The first executable migration check is the [synthetic legacy baseline](docs/migration-baseline.md).
It records diagnostic behavior and renders example PDFs before extraction.
Version-1 [diagnostic validation](win-diagnostics/docs/diagnostic-contract.md) and
[report validation](reportist/docs/report-contract.md) are available independently
Version-1 [diagnostic validation](diagnostics/docs/diagnostic-contract.md) and
[report validation](reporter/docs/report-contract.md) are available independently
in their component repositories. The pinned components now run the sanitized
end-to-end pipeline through the root workflow; native collection and historical
incident migration remain in progress.

View File

@ -26,7 +26,7 @@ if ! $check_only; then
git submodule update --init --recursive
fi
for component in win-diagnostics reportist beffroi-reports; do
for component in diagnostics reporter reports; do
if [[ ! -e "$component/.git" ]]; then
echo "Missing component checkout: $component" >&2
echo 'Run ./bootstrap.sh with network access to initialize pinned submodules.' >&2
@ -40,7 +40,7 @@ while IFS= read -r status; do
exit 1
fi
done < <(git submodule status --recursive)
for component in win-diagnostics reportist; do
for component in diagnostics reporter; do
if [[ ! -f "$component/requirements.txt" ]]; then
echo "Missing dependency lock: $component/requirements.txt" >&2
exit 1
@ -56,7 +56,7 @@ if $check_only; then
exit 0
fi
for component in win-diagnostics reportist; do
for component in diagnostics reporter; do
environment=".venv/component-checks/$component"
uv venv --python 3.11 --allow-existing "$environment"
uv pip sync --python "$environment/bin/python" "$component/requirements.txt"

View File

@ -56,9 +56,9 @@ accuracy. Linked vendor guidance has not been revalidated.
## Next pass
- [Diagnostic inventory and draft contract](../win-diagnostics/docs/migration-inventory.md)
- [Renderer inventory and draft field mapping](../reportist/docs/migration-inventory.md)
- [Private preservation and adapter decisions](../beffroi-reports/docs/migration-inventory.md)
- [Diagnostic inventory and draft contract](../diagnostics/docs/migration-inventory.md)
- [Renderer inventory and draft field mapping](../reporter/docs/migration-inventory.md)
- [Private preservation and adapter decisions](../reports/docs/migration-inventory.md)
Implement versioned schemas with valid/invalid synthetic examples, then extract
one offline diagnostic and generic rendering slice against this baseline. Finish

View File

View File

@ -8,7 +8,7 @@ command -v uv >/dev/null 2>&1 || {
exit 1
}
for component in win-diagnostics reportist; do
for component in diagnostics reporter; do
if [[ ! -f "$component/requirements.txt" || ! -f "$component/tests/test_contract.py" ]]; then
echo "Missing $component checks. Run: git submodule update --init --recursive" >&2
exit 1
@ -22,7 +22,7 @@ command -v typst >/dev/null 2>&1 || {
typst --version
uv --version
for component in win-diagnostics reportist; do
for component in diagnostics reporter; do
echo "Checking $component ($(git -C "$component" rev-parse HEAD))"
environment=".venv/component-checks/$component"
uv venv --python 3.11 --allow-existing "$environment"
@ -31,25 +31,25 @@ for component in win-diagnostics reportist; do
"$environment/bin/python" -m unittest discover -s "$component/tests" -p 'test_*.py' -v
done
echo "Checking beffroi-reports ($(git -C beffroi-reports rev-parse HEAD))"
DIAGNOSTIC_VALIDATOR="$(pwd)/win-diagnostics/tools/validate.py" \
REPORT_VALIDATOR="$(pwd)/reportist/tools/validate.py" \
BRANDING="$(pwd)/beffroi-reports/config/branding/default.json" \
BRANDING_ROOT="$(pwd)/beffroi-reports" \
BRANDING_DIRECTORY="$(pwd)/beffroi-reports/config/branding" \
.venv/component-checks/reportist/bin/python -m unittest discover \
-s beffroi-reports/tests -p 'test_*.py' -v
echo "Checking reports ($(git -C reports rev-parse HEAD))"
DIAGNOSTIC_VALIDATOR="$(pwd)/diagnostics/tools/validate.py" \
REPORT_VALIDATOR="$(pwd)/reporter/tools/validate.py" \
BRANDING="$(pwd)/reports/config/branding/default.json" \
BRANDING_ROOT="$(pwd)/reports" \
BRANDING_DIRECTORY="$(pwd)/reports/config/branding" \
.venv/component-checks/reporter/bin/python -m unittest discover \
-s reports/tests -p 'test_*.py' -v
pipeline_check_parent="$(mktemp -d "${TMPDIR:-/tmp}/beffroi-pipeline-check.XXXXXX")"
trap 'rm -rf -- "$pipeline_check_parent"' EXIT
pipeline_check_root="$pipeline_check_parent/run"
bash scripts/workflow.sh all \
win-diagnostics/tests/fixtures/legacy/windiagnostics-v1.json \
win-diagnostics/tests/fixtures/legacy \
diagnostics/tests/fixtures/legacy/windiagnostics-v1.json \
diagnostics/tests/fixtures/legacy \
"$pipeline_check_root" \
2026-09-15T12:00:00Z \
'Synthetic diagnostic draft' 'CI Test' 2026-09-15
.venv/component-checks/win-diagnostics/bin/python -c \
.venv/component-checks/diagnostics/bin/python -c \
'import json,sys; d=json.load(open(sys.argv[1], encoding="utf-8")); assert d["findings"][0]["id"] == "event-service-control-manager-7000"; assert d["findings"][0]["evidence"] == ["event-recent_system_errors-1"]' \
"$pipeline_check_root/diagnostic.json"
test "$(head -c 5 "$pipeline_check_root/report.pdf")" = '%PDF-'

View File

@ -13,9 +13,9 @@ import tempfile
ROOT = Path(__file__).resolve().parents[1]
SOURCE = ROOT / "references/typist_reporter"
REVISION = "1d381904fff3d378a7c0e04588e75310a9b7ed60"
FIXTURES = ROOT / "win-diagnostics/tests/fixtures/legacy"
REPORTS = ROOT / "reportist/tests/fixtures/legacy"
EXPECTED = ROOT / "win-diagnostics/tests/legacy-baseline.json"
FIXTURES = ROOT / "diagnostics/tests/fixtures/legacy"
REPORTS = ROOT / "reporter/tests/fixtures/legacy"
EXPECTED = ROOT / "diagnostics/tests/legacy-baseline.json"
# Explicit allowlist: never materialize real reports or diagnostic captures.
SOURCE_FILES = (
"LICENSE", "report.typ", "diagnostics.typ", "modules/model.typ",

View File

@ -21,8 +21,8 @@ require_values() {
done
}
diagnostic_python=.venv/component-checks/win-diagnostics/bin/python
report_python=.venv/component-checks/reportist/bin/python
diagnostic_python=.venv/component-checks/diagnostics/bin/python
report_python=.venv/component-checks/reporter/bin/python
for executable in "$diagnostic_python" "$report_python"; do
[[ -x "$executable" ]] || {
echo "Missing prepared environment: $executable" >&2
@ -34,28 +34,28 @@ done
analyse() {
[[ $# -eq 4 ]] || usage
require_values "$@"
"$diagnostic_python" win-diagnostics/tools/analyse.py "$1" \
"$diagnostic_python" diagnostics/tools/analyse.py "$1" \
--evidence-root "$2" --output "$3" --reference-time "$4" \
--producer-version "$(git -C win-diagnostics rev-parse HEAD)"
--producer-version "$(git -C diagnostics rev-parse HEAD)"
}
draft() {
[[ $# -eq 6 ]] || usage
require_values "$@"
"$report_python" beffroi-reports/tools/diagnostic-to-report.py \
"$report_python" reports/tools/diagnostic-to-report.py \
--diagnostic "$1" --evidence-root "$2" --output-dir "$3" \
--title "$4" --author "$5" --date "$6" \
--generator-version "$(git -C beffroi-reports rev-parse HEAD)" \
--diagnostic-validator win-diagnostics/tools/validate.py \
--report-validator reportist/tools/validate.py \
--branding beffroi-reports/config/branding/default.json \
--branding-root beffroi-reports
--generator-version "$(git -C reports rev-parse HEAD)" \
--diagnostic-validator diagnostics/tools/validate.py \
--report-validator reporter/tools/validate.py \
--branding reports/config/branding/default.json \
--branding-root reports
}
render() {
[[ $# -eq 2 ]] || usage
require_values "$@"
"$report_python" reportist/tools/render.py "$1" --output "$2"
"$report_python" reporter/tools/render.py "$1" --output "$2"
}
command_name="${1:-}"