Skip to content

Commit 4ea12a4

Browse files
committed
feat(automation): run html4tree hourly NVIDIA NIM review repair
Add a thin minute-15 caller for ContextualWisdomLab/html4tree against protected master so directory-index heads receive the same sealed exact-head RCA loop as Clearfolio, DiskSage, and fast-mlsirm. The reusable scheduler stays product-neutral. The caller maps only established scheduler credentials, grants job-scoped OIDC, and never receives NVIDIA_NIM_API_KEY or COPILOT_GITHUB_TOKEN.
1 parent c47bee5 commit 4ea12a4

6 files changed

Lines changed: 375 additions & 4 deletions

File tree

.github/workflows/hourly-nvidia-nim-review-repair.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
- .github/workflows/github-hourly-review-repair.yml
1414
- .github/workflows/governance-risk-compliance-hourly-review-repair.yml
1515
- .github/workflows/hourly-nvidia-nim-review-repair.yml
16+
- .github/workflows/html4tree-hourly-review-repair.yml
1617
- .github/workflows/nonnest2-hourly-review-repair.yml
1718
- .github/workflows/originweave-hourly-review-repair.yml
1819
- .github/workflows/quarantine-sandbox-hourly-review-repair.yml
@@ -27,6 +28,7 @@ on:
2728
- tests/test_nonnest2_hourly_review_caller.py
2829
- tests/test_originweave_hourly_review_caller.py
2930
- tests/test_quarantine_sandbox_hourly_review_caller.py
31+
- tests/test_html4tree_hourly_review_caller.py
3032
- tests/test_hourly_autofix_context_quality_gate.py
3133
- tests/test_pr_review_conflict_scope.py
3234
- tests/test_pr_review_conflict_scope_control_files.py
@@ -51,6 +53,7 @@ on:
5153
- docs/doctoring/nonnest2-hourly-review-caller.md
5254
- docs/doctoring/originweave-hourly-review-caller.md
5355
- docs/doctoring/quarantine-sandbox-hourly-review-caller.md
56+
- docs/doctoring/html4tree-hourly-review-caller.md
5457
push:
5558
paths:
5659
- .github/workflows/pr-review-fix-scheduler.yml
@@ -63,6 +66,7 @@ on:
6366
- .github/workflows/github-hourly-review-repair.yml
6467
- .github/workflows/governance-risk-compliance-hourly-review-repair.yml
6568
- .github/workflows/hourly-nvidia-nim-review-repair.yml
69+
- .github/workflows/html4tree-hourly-review-repair.yml
6670
- .github/workflows/nonnest2-hourly-review-repair.yml
6771
- .github/workflows/originweave-hourly-review-repair.yml
6872
- .github/workflows/quarantine-sandbox-hourly-review-repair.yml
@@ -77,6 +81,7 @@ on:
7781
- tests/test_nonnest2_hourly_review_caller.py
7882
- tests/test_originweave_hourly_review_caller.py
7983
- tests/test_quarantine_sandbox_hourly_review_caller.py
84+
- tests/test_html4tree_hourly_review_caller.py
8085
- tests/test_hourly_autofix_context_quality_gate.py
8186
- tests/test_pr_review_conflict_scope.py
8287
- tests/test_pr_review_conflict_scope_control_files.py
@@ -101,6 +106,7 @@ on:
101106
- docs/doctoring/nonnest2-hourly-review-caller.md
102107
- docs/doctoring/originweave-hourly-review-caller.md
103108
- docs/doctoring/quarantine-sandbox-hourly-review-caller.md
109+
- docs/doctoring/html4tree-hourly-review-caller.md
104110

105111
permissions:
106112
contents: read
@@ -157,6 +163,7 @@ jobs:
157163
tests/test_nonnest2_hourly_review_caller.py \
158164
tests/test_originweave_hourly_review_caller.py \
159165
tests/test_quarantine_sandbox_hourly_review_caller.py \
166+
tests/test_html4tree_hourly_review_caller.py \
160167
tests/test_pr_review_conflict_scope_control_files.py \
161168
tests/test_hourly_autofix_context_quality_gate.py \
162169
tests/test_pr_review_conflict_scope_git_executable.py \
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: html4tree Hourly Review Repair
2+
3+
on:
4+
schedule:
5+
# Minute 15 avoids pg-llm-batch (1), aFIPC (2), kaefa (3), LineageWeave (4),
6+
# codec-carver (5), life-os (6), Wardnet (7), mightyETL (8),
7+
# psychometrics-commons (9), OriginWeave (10), naruon (11),
8+
# DiagramWeave (12), pg-erd-cloud (13), mhtml-etl-gateway (14),
9+
# orchestrator (17), noema (19), Clearfolio (23), Keyverse (29),
10+
# Scopeweave (31), DiskSage (37), Appguardrail (41), newsdom-api (43),
11+
# Inkspan (47), fast-mlsirm (49), BandScope (53), and
12+
# semantic-data-portal (59).
13+
- cron: "15 * * * *"
14+
15+
concurrency:
16+
group: html4tree-hourly-review-repair
17+
# A later heartbeat must not cancel an in-flight directory-index RCA.
18+
cancel-in-progress: false
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
dispatch-review-repair:
25+
permissions:
26+
contents: read
27+
id-token: write
28+
uses: ./.github/workflows/pr-review-fix-scheduler.yml
29+
with:
30+
target_repository: ContextualWisdomLab/html4tree
31+
base_branch: master
32+
max_prs: "50"
33+
max_dispatches: "1"
34+
retry_hours: "2"
35+
secrets:
36+
PR_REVIEW_MERGE_TOKEN: ${{ secrets.PR_REVIEW_MERGE_TOKEN }}
37+
OPENCODE_APPROVE_TOKEN: ${{ secrets.OPENCODE_APPROVE_TOKEN }}

ARCHITECTURE.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ only established scheduler credentials, and grants job-scoped
3838
16. It names `ContextualWisdomLab/nonnest2` and protected `master`, maps
3939
only established scheduler credentials, and grants job-scoped
4040
`id-token: write`. The reusable engine stays product-neutral.
41+
## html4tree hourly caller
42+
43+
`html4tree-hourly-review-repair.yml` is a thin, read-only caller at
44+
minute 15. It names `ContextualWisdomLab/html4tree` and protected
45+
`master`, maps only established scheduler credentials, and grants
46+
job-scoped `id-token: write`. The reusable engine stays product-neutral.
47+
html4tree remains a standalone public-fork module; mutation stays
48+
capability-gated per head.
4149

4250
## Hourly NVIDIA NIM repair gate
4351

@@ -66,9 +74,10 @@ The worker checks out helpers at `${{ github.sha }}` so a later default-branch
6674
push cannot replace privileged scripts after dispatch (CWE-367). Repair binds
6775
`NVIDIA_NIM_API_KEY`, never `COPILOT_GITHUB_TOKEN`.
6876

69-
Product callers stagger Clearfolio at minute 23, DiskSage at minute 37, and
70-
fast-mlsirm at minute 49. Each caller is read-only, dispatches at most one
71-
repair, and delegates all privileged logic to the same sealed scheduler.
77+
Product callers stagger html4tree at minute 15, Clearfolio at minute 23,
78+
DiskSage at minute 37, and fast-mlsirm at minute 49. Each caller is
79+
read-only, dispatches at most one repair, and delegates all privileged
80+
logic to the same sealed scheduler.
7281

7382
## Control-plane data flow
7483

@@ -123,4 +132,6 @@ trusted `uv` exporter is downloaded from the literal GitHub Releases URL for
123132
- [`docs/doctoring/hourly-nvidia-nim-autofix.md`](docs/doctoring/hourly-nvidia-nim-autofix.md)
124133
— current increment's repair-worker decision and APA 7th citations.
125134
- [`docs/doctoring/fast-mlsirm-hourly-review-caller.md`](docs/doctoring/fast-mlsirm-hourly-review-caller.md)
126-
— product-specific psychometric repair heartbeat and scientific gates.
135+
— product-specific psychometric repair heartbeat and scientific gates.
136+
- [`docs/doctoring/html4tree-hourly-review-caller.md`](docs/doctoring/html4tree-hourly-review-caller.md)
137+
— public-fork directory-index repair heartbeat on protected `master`.

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Semantic Versioning where the repository publishes a release.
1212
- Added a dedicated Quarantine Sandbox Runtime hourly caller at minute 14 that targets protected `develop`, dispatches at most one exact-head repair, applies a two-hour same-head retry floor, preserves non-cancelling single-flight execution, and maps only the established scheduler credentials with job-scoped OIDC.
1313
- Added a dedicated Quarantine Sandbox Runtime hourly caller at minute 14 that targets protected `develop`, dispatches at most one exact-head repair, applies a two-hour same-head retry floor, preserves non-cancelling single-flight execution, and maps only the established scheduler credentials with job-scoped OIDC.
1414
- Added a dedicated OriginWeave hourly caller that invokes the product-neutral central scheduler with the exact repository, protected `main` branch, one-dispatch budget, two-hour same-head retry floor, non-cancelling single-flight heartbeat, job-scoped OIDC, and only the established scheduler credentials.
15+
- Added a dedicated html4tree hourly caller that invokes the product-neutral central scheduler with the exact public-fork repository, protected `master` branch, one-dispatch budget, two-hour same-head retry floor, non-cancelling single-flight heartbeat, job-scoped OIDC, and only the established scheduler credentials.
1516
- Added a trusted pull-request comment router for `@cwl-noema-review` and review-only `@opencode-agent` dispatches, with an organization sweep, exact-head receipts, repository allowlisting, fixed runners, immutable checkout pins, and a permanent 100% statement/branch/docstring quality gate.
1617
- Added exact-base `uv.lock` materialization that reconstructs standalone nested projects with a checksum-pinned official `uv` exporter, isolated frozen/offline execution, strict exact-pin and SHA-256 output validation, and complete Python 3.10/3.14 quality evidence.
1718
- Added a permanent exact-head contract workflow for the hourly review-repair scheduler, immutable reusable-workflow source, NVIDIA NIM model boundary, credential isolation, and fail-closed unattended-agent permissions.
@@ -26,6 +27,7 @@ Semantic Versioning where the repository publishes a release.
2627
- Run the bounded Clearfolio PR review-feedback repair caller at minute 23 of every hour while keeping the shared scheduler free of product-specific timers and repository names for modular reuse by naruon, contextual-orchestrator, Inkspan, and other CWL services.
2728
- Run the bounded DiskSage repair heartbeat at minute 37 of every hour, dispatch no more than one exact-head repair, and wait two hours before redispatching an unchanged head so legitimate OpenCode or NVIDIA NIM latency does not create duplicate writers.
2829
- Run the bounded fast-mlsirm repair heartbeat at minute 49 of every hour with one-dispatch scope and a two-hour same-head floor, without weakening true-parameter recovery, CPU/GPU parity, skipped-test, or Rust-ownership gates.
30+
- Run the bounded html4tree repair heartbeat at minute 15 of every hour against protected `master`, dispatch no more than one exact-head repair, and keep mutation capability-gated on the public fork.
2931
- Use NVIDIA NIM `mistralai/mistral-small-4-119b-2603` with explicit high reasoning for scheduled repair and `nvidia/nemotron-3-nano-30b-a3b` for bounded helper work instead of GitHub Models in the write-capable autofix worker.
3032
- Apply one NUL-delimited exact-path and complete pre/post-worktree verification contract to both ordinary review repair and merge-conflict repair rather than relying on a visible post-model diff for the ordinary path.
3133

@@ -60,6 +62,7 @@ Semantic Versioning where the repository publishes a release.
6062
- Keep the Clearfolio caller and reusable scheduler read-only at workflow and job scope; authorize mutation only through explicitly mapped `PR_REVIEW_MERGE_TOKEN`, `OPENCODE_APPROVE_TOKEN`, or the short-lived OpenCode GitHub App token exchanged from OIDC, with explicit pre-write guards and no `github.token` mutation fallback.
6163
- Keep the DiskSage caller read-only and pass only the established scheduler credentials; do not inherit secrets, expose the NVIDIA NIM model credential to the queue scanner, use a GitHub Copilot token, or grant the caller repository mutation permissions.
6264
- Keep the fast-mlsirm caller read-only and model-secret-free; preserve independent approval, exact-head evidence, and Rust production-arithmetic ownership while centralizing only bounded review repair.
65+
- Keep the html4tree caller read-only and model-secret-free; name the public fork and protected `master` explicitly so directory-index heads receive the same sealed scheduler without widening workflow-token write.
6366
- Bind `NVIDIA_NIM_API_KEY` only to the two OpenCode model execution steps, fail closed when the secret is absent, and remove GitHub and Actions OIDC credentials from both model subprocesses. The decision record now cites CWE-367 so a later default-branch push cannot replace privileged repair helpers after `repository_dispatch` has already selected the workflow revision.
6467
- Recorded the org control-plane architecture, including the hourly NVIDIA NIM repair gate, so agents reconstruct the write-capable worker trust boundary from the repo instead of private memory.
6568
- Deny unnecessary non-file OpenCode interactions and preserve the independent read-only reviewer workflow and its credential/model-pool contract byte-for-byte.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# html4tree hourly review-repair caller
2+
3+
검토 기준일: **2026-08-17**
4+
5+
## Decision
6+
7+
ContextualWisdomLab operates one protected hourly caller for
8+
`ContextualWisdomLab/html4tree` (standalone MIT directory-index generator
9+
that writes `index.html` trees in the style of Apache `mod_autoindex`).
10+
The caller runs at minute 15, delegates to the product-neutral central
11+
review-fix scheduler, inspects at most 50 open pull requests targeting
12+
protected `master`, and dispatches at most one bounded repair per
13+
heartbeat.
14+
15+
A paying buyer of governed directory listings would feel live html4tree
16+
pull requests stalling while hourly NVIDIA NIM repair scanned only
17+
Clearfolio, DiskSage, and fast-mlsirm. Live heads such as
18+
ContextualWisdomLab/html4tree#475 (localized navigation labels),
19+
ContextualWisdomLab/html4tree#472 (TOCTOU on `.html4ignore`), and
20+
ContextualWisdomLab/html4tree#454 (BiDi spoof / Trojan Source) target
21+
`master` and never enter those other callers.
22+
23+
html4tree is a public fork of `yencarnacion/html4tree`. Fork status is
24+
not a categorical exclusion: onboarding is an explicit repository
25+
decision, and pull-request mutation remains capability-gated per head.
26+
The caller does not implement review or mutation logic itself.
27+
html4tree remains standalone; naruon and other CWL services may consume
28+
generated indexes without owning the crawler. Privileged automation
29+
stays in `ContextualWisdomLab/.github`.
30+
31+
## Root-cause analysis and remediation feasibility
32+
33+
The reusable worker performs exact-head root-cause analysis and tests
34+
remediation feasibility before it edits. The reusable worker must:
35+
36+
1. Refetch the exact live head, base, reviews, checks, changed paths, and
37+
writer state.
38+
2. Establish the causal chain rather than repeat the terminal symptom.
39+
3. Enumerate materially distinct minimal remedies.
40+
4. Reject remedies that lack writer authority, cross sealed paths, require
41+
unavailable credentials or protected-setting changes, violate stack
42+
order, cannot be verified, or do not alter the diagnosed cause.
43+
5. Dispatch at most one feasible repair. Otherwise leave the tree
44+
unchanged.
45+
46+
A queued or pending check remains a merge blocker but is not itself a
47+
code finding. The independent non-author approval remains an external
48+
authorization gate and is never synthesized by the repair worker. The
49+
worker cannot approve, merge, release, resolve review findings by
50+
inference, change protection, or manufacture passing checks.
51+
52+
## Cadence and concurrency
53+
54+
The caller uses a single concurrency group and `cancel-in-progress: false`.
55+
This preserves an in-flight bounded RCA instead of discarding directory-
56+
listing evidence when the next hourly heartbeat arrives. The reusable
57+
scheduler cancels only its own superseded short queue scan.
58+
59+
The caller sets a **two-hour same-head retry floor**. Central OpenCode and
60+
NVIDIA NIM work, plus BiDi or TOCTOU analysis, can legitimately approach
61+
two hours. An hourly redispatch of the same unchanged head would create
62+
duplicate writer pressure rather than faster remediation.
63+
64+
GitHub scheduled workflows can be delayed under load and execute only
65+
from the default branch. The cron expression is a heartbeat, not a
66+
real-time SLA.
67+
68+
## Credential and model boundary
69+
70+
The caller keeps workflow `GITHUB_TOKEN` at `contents: read` and grants
71+
the reusable job `id-token: write` so the central scheduler can mint the
72+
OpenCode GitHub App token from GitHub OIDC when the mapped PAT is absent
73+
(GitHub, n.d.-c). It maps only `PR_REVIEW_MERGE_TOKEN` and
74+
`OPENCODE_APPROVE_TOKEN`. It never uses `secrets: inherit`, receives
75+
`NVIDIA_NIM_API_KEY`, or introduces `COPILOT_GITHUB_TOKEN`. CWE-250
76+
forbids executing the caller with write or model privileges it does not
77+
need (MITRE, 2026).
78+
79+
Model execution remains inside the central worker. The model credential
80+
is the GitHub Secret `NVIDIA_NIM_API_KEY`; the caller does not receive or
81+
forward it.
82+
83+
Before protected-master activation, the repository variable
84+
`OPENCODE_REPOSITORY_DISPATCH_TARGETS` must contain the exact
85+
`ContextualWisdomLab/html4tree` target. Missing or mismatched
86+
configuration fails before mutation credential materialization.
87+
88+
## Security, standalone operation, and modularity
89+
90+
The caller adds no html4tree runtime dependency, database object,
91+
network endpoint, tenant authority, or product credential. html4tree
92+
continues to run as a standalone directory-index generator. Naruon and
93+
other CWL services may consume its `index.html` trees, but they cannot
94+
weaken its exact-head, approval, or security gates.
95+
96+
## Verification and rollback
97+
98+
Machine-checkable contracts require the exact target/base, minute 15
99+
cadence, non-cancelling single-flight group, one dispatch, two-hour
100+
retry floor, explicit secret mapping, read-only contents plus job-scoped
101+
`id-token: write`, focused path-filter coverage, and absence of model or
102+
Copilot credentials. Independent `pull_request`, `push`, and `compileall`
103+
path blocks must each name the caller, doctoring, or contract they own.
104+
105+
After source integration, closure requires a scheduled or manual
106+
protected-master consumer run proving the exact html4tree repository
107+
and `master` base. Source checks alone are not protected-master operational acceptance.
108+
Merge still requires zero unresolved valid findings and a
109+
qualifying independent non-author approval.
110+
111+
Rollback removes the html4tree caller, its focused test, doctoring, and
112+
central path-filter/documentation entries. It must not remove scheduler
113+
dispatch validation or affect independent product callers.
114+
115+
## APA 7th references
116+
117+
GitHub, Inc. (n.d.-a). *Events that trigger workflows*. GitHub Docs.
118+
Retrieved August 17, 2026, from
119+
https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule
120+
121+
GitHub, Inc. (n.d.-b). *Reuse workflows*. GitHub Docs. Retrieved August
122+
17, 2026, from
123+
https://docs.github.com/en/actions/how-tos/sharing-automations/reuse-workflows
124+
125+
GitHub, Inc. (n.d.-c). *Automatic token authentication*. GitHub Docs.
126+
Retrieved August 17, 2026, from
127+
https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
128+
129+
MITRE. (2026). *CWE-250: Execution with unnecessary privileges*.
130+
https://cwe.mitre.org/data/definitions/250.html
131+
132+
National Institute of Standards and Technology. (2022). *Secure software
133+
development framework (SSDF) version 1.1: Recommendations for mitigating
134+
the risk of software vulnerabilities* (NIST Special Publication 800-218).
135+
https://doi.org/10.6028/NIST.SP.800-218
136+
137+
NVIDIA. (n.d.). *NVIDIA NIM for large language models documentation*.
138+
Retrieved August 17, 2026, from
139+
https://docs.nvidia.com/nim/large-language-models/latest/
140+
141+
OpenCode. (n.d.). *OpenCode documentation*. Retrieved August 17, 2026,
142+
from https://opencode.ai/docs/

0 commit comments

Comments
 (0)