Skip to content

Commit 62ee604

Browse files
committed
ci: skip disabled public wiki remotes
1 parent 9716f5f commit 62ee604

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

docs/handbook/acceptance-gates.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ <h1>Acceptance Gates</h1>
6464
<tr><td>GATE-OWNER-INTERFACE-01</td><td>accepted</td><td>CLI and CI/CD pipelines may compose owner operations, but mutation and validation logic must live in the owning module rather than in shell scripts or adapter-specific branches.</td></tr>
6565
<tr><td>GATE-GITLAB-CONTROL-01</td><td>accepted</td><td><code>git remote -v</code> has <code>gitlab</code> as the normal publish target; GitHub and Codeberg are not local publish targets unless the user explicitly overrides the boundary.</td></tr>
6666
<tr><td>GATE-RELEASE-PUBLISH-01</td><td>accepted</td><td>GitLab protected branches include <code>release</code>; GitLab remote mirrors are disabled; a protected <code>release</code> pipeline creates an assigned approval work item and pending To-Do before the manual approval job waits; GitHub and Codeberg repository <code>release</code> branches change only after the protected <code>release</code> manual approval job runs and must not contain GitLab-only control-plane files, GitLab-only comments, CI annotations, or author strings such as <code>.gitlab-ci.yml</code> or <code>GitLab CI</code>.</td></tr>
67-
<tr><td>GATE-WIKI-PROJECTION-01</td><td>accepted</td><td>GitLab CI on protected <code>release</code> generates wiki pages from <code>docs/handbook/*.html</code>; GitLab wiki pages publish automatically before public approval; GitHub and Codeberg wiki publish jobs run only after the manual approval gate, contain <code>Home.md</code> and <code>_Sidebar.md</code> when the target wiki repositories exist, and skip missing public wiki remotes unless <code>PUBLIC_WIKI_REQUIRED=1</code>.</td></tr>
67+
<tr><td>GATE-WIKI-PROJECTION-01</td><td>accepted</td><td>GitLab CI on protected <code>release</code> generates wiki pages from <code>docs/handbook/*.html</code>; GitLab wiki pages publish automatically before public approval; GitHub and Codeberg wiki publish jobs run only after the manual approval gate, contain <code>Home.md</code> and <code>_Sidebar.md</code> when the target wiki repositories exist, and skip missing or disabled public wiki remotes unless <code>PUBLIC_WIKI_REQUIRED=1</code>.</td></tr>
6868
<tr><td>GATE-DOC-01</td><td>accepted</td><td>Handbook links resolve; index parses; forbidden pseudo-schema vocabulary is absent from canonical paths.</td></tr>
6969
<tr><td>GATE-PUBLIC-01</td><td>accepted</td><td>Public release shell has README, LICENSE, CHANGELOG, package metadata, CI, examples, security policy, contribution guide, and repo-local <code>npm run verify</code>.</td></tr>
7070
</tbody>

docs/handbook/deployment.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ <h2>GitLab Control Plane</h2>
8686
<tr><td>GitLab to GitHub/Codeberg repos</td><td>GitLab CI executor after manual approval</td><td>Protected CI variables</td><td>Remote mirrors are disabled; repository publish jobs run only after the protected <code>release</code> manual approval gate and publish a filtered public snapshot, not the GitLab control-plane commit directly.</td></tr>
8787
<tr><td>manual approval visibility</td><td>GitLab approval work item and To-Do projection</td><td>Protected GitLab token</td><td>Protected <code>release</code> pipelines create or update an assigned approval work item and To-Do before <code>approve_public_projection</code> waits for manual action.</td></tr>
8888
<tr><td>handbook to GitLab wiki</td><td>GitLab CI executor</td><td>Protected GitLab token</td><td>Protected <code>release</code> build jobs generate wiki Markdown from <code>docs/handbook/*.html</code> and publish every GitLab wiki page before public approval.</td></tr>
89-
<tr><td>handbook to GitHub/Codeberg wikis</td><td>GitLab CI executor after manual approval</td><td>Protected CI variables</td><td>Public wiki publish jobs run only after the protected <code>release</code> manual approval gate. Missing public wiki repositories are skipped unless <code>PUBLIC_WIKI_REQUIRED=1</code>.</td></tr>
89+
<tr><td>handbook to GitHub/Codeberg wikis</td><td>GitLab CI executor after manual approval</td><td>Protected CI variables</td><td>Public wiki publish jobs run only after the protected <code>release</code> manual approval gate. Missing or disabled public wiki repositories are skipped unless <code>PUBLIC_WIKI_REQUIRED=1</code>.</td></tr>
9090
</tbody>
9191
</table>
9292
<p>GitLab <code>release</code> keeps GitLab-only control-plane files such as <code>.gitlab-ci.yml</code>. GitHub and Codeberg <code>release</code> receive a filtered snapshot that excludes GitLab CI and publication helper scripts, so public release commits are content projections and are not expected to have the same SHA as the GitLab <code>release</code> commit. Public projection commits and wiki commits use a neutral release-bot identity and must not expose GitLab-only comments, CI annotations, or control-plane filenames.</p>
9393
<p>The manual approval job is the execution gate. The approval work item and To-Do item are the visibility gate: they make the waiting public projection visible outside the pipeline page and are closed only after the public repository and wiki publish jobs succeed. The current GitLab API write path is the issue endpoint, while the GitLab UI presents the created object as a work item. Assignment is the primary To-Do owner; a manual marked To-Do is only a fallback when no approval assignee exists.</p>
9494
<p>Future approval automation must use an explicit work-item signal, not the open or closed state. The stable route is: a human adds an approval label such as <code>public-projection-approved</code> to the approval work item; an automation token with permission to play CI jobs reads that label, finds the waiting <code>approve_public_projection</code> job, and calls GitLab Jobs API <code>POST /projects/:id/jobs/:job_id/play</code>. Closing the work item remains a post-publish cleanup signal, not approval.</p>
95-
<p>The handbook remains architecture truth. GitLab, GitHub, and Codeberg wiki pages are generated projections for navigation and must not become a second source of truth. Public wiki absence must not block repository release; enable the target wiki repository first when public wiki projection is required as a hard gate.</p>
95+
<p>The handbook remains architecture truth. GitLab, GitHub, and Codeberg wiki pages are generated projections for navigation and must not become a second source of truth. Public wiki absence or disabled wiki state must not block repository release; enable the target wiki repository first when public wiki projection is required as a hard gate.</p>
9696
</section>
9797

9898
<section id="deployment-targets">

scripts/publish_wikis.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ publish_git_wiki() {
2828
work_dir="$(make_temp_dir)"
2929
clone_log="$(make_temp_dir)/clone.log"
3030
if ! git clone "$remote_url" "$work_dir" 2>"$clone_log"; then
31-
if grep -qi "not found" "$clone_log" && [ "${PUBLIC_WIKI_REQUIRED:-0}" != "1" ]; then
31+
if grep -Eqi "not found|wiki is disabled" "$clone_log" && [ "${PUBLIC_WIKI_REQUIRED:-0}" != "1" ]; then
3232
echo "wiki skipped: ${label} remote missing"
3333
return 0
3434
fi

test/deploy.test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ test('public wiki projection skips missing wiki remotes unless required', () =>
6161
const wikiPublisher = fs.readFileSync('scripts/publish_wikis.sh', 'utf8')
6262
assert.match(wikiPublisher, /wiki skipped: \$\{label\} remote missing/)
6363
assert.match(wikiPublisher, /PUBLIC_WIKI_REQUIRED:-0/)
64-
assert.match(wikiPublisher, /grep -qi "not found"/)
64+
assert.match(wikiPublisher, /not found\|wiki is disabled/)
6565
})

0 commit comments

Comments
 (0)