Skip to content

[T-42af] replace stale root charter references - #290

Open
pkyosx wants to merge 3 commits into
mainfrom
task/t-42af-constitution-links
Open

pkyosx wants to merge 3 commits into
mainfrom
task/t-42af-constitution-links

Conversation

@pkyosx

@pkyosx pkyosx commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary\n- Replace 69 references whose root content still exists but lost numbered doors with stable root titles.\n- Correct 5 references whose old doors now point at different content.\n- Route 5 deleted root §9 code-hygiene pointers to the five-point checklist added to the OffiCraft · 開發 manual.\n- Update spec/openapi.json and regenerate server/ocserverd/ocapi_gen.go plus frontend/src/api/generated/schema.ts.\n\n## Verification\n- git diff --check and JSON parse pass.\n- make drift-ocapi and make drift-schema-ts pass.\n- Independent pre-edit denominator: 79 root references = 69 surviving-content + 5 moved-door + 5 deleted-checklist. Positive control passes; current root old-door and deleted-checklist scans are zero.\n- Manual readback confirms five points, unchanged learnings, and caps respected.\n\nNo server/browser, merge, release, or deployment performed. Task: T-42af.

Review follow-up

The specified review snapshot was 7f6297d (base 7f95494). The current PR head is 1dcd590.

Blocker 1: nonexistent stable title

Fixed in 1dcd590:

  • server/ocserverd/api_chat_id_identity_ta828_test.go:32
  • server/ocserverd/routes_t6020_governance_test.go:66

Both now point to the exact current root heading root CLAUDE.md「驗證、CI 與出貨」. A repository scan for 驗證、CI 與出貨/PR 與驗證紀律 returns zero.

Blocker 2: gofmt

The exact-snapshot failure was fixed in the already-pushed incremental commit 1a85552, which changes only the extra indentation in server/ocserverd/routes.go. gofmt -d server/ocserverd/routes.go is empty on the current head.

Blocker 3: reproducible denominator and inventory

There are two different units in the exact patch:

  • 78 deleted-side lines contain at least one § marker. Subtracting the one docs/dev/README.md:223 line that also contains the local spec/mcp.md §5 anchor gives the reviewer's 77 line hits.
  • The classification denominator counts numeric reference occurrences, not lines. The exact patch has 80 numeric marker occurrences; subtracting that one local spec/mcp.md §5 occurrence gives 79 root numeric references.
  • Two lines explain the difference: docs/dev/README.md:223 has one root §13 plus the excluded local spec/mcp.md §5; server/ocserverd/authz.go:4 has two root references (§5 and §14).

Reproduce the counts from the specified first commit:

git show --format= --unified=0 7f6297d68280c450aae8412770c6a1a68d42b745 -- |
awk '
/^--- a\// {file=substr($0,7); next}
/^@@ / {spec=$2; sub(/^-/, "", spec); split(spec,a,","); old=a[1]; next}
/^-/ && !/^---/ {
  s=substr($0,2)
  if (s ~ /§/) deleted_lines++
  numeric += gsub(/§[0-9]+/, "&", s)
  local += gsub(/spec\/mcp\.md\]\([^)]*\) §5/, "&", s)
  old++
  next
}
/^+/ {next}
/^ / {old++; next}
END {
  printf "deleted_lines_with_§=%d\nnumeric_marker_occurrences=%d\nlocal_spec_mcp_§5=%d\nroot_numeric_reference_occurrences=%d\n",
    deleted_lines, numeric, local, numeric-local
}'

Expected output:

deleted_lines_with_§=78
numeric_marker_occurrences=80
local_spec_mcp_§5=1
root_numeric_reference_occurrences=79

Positive control (must hit the pre-edit root anchor):

git show 7f95494ea019f2e7f42753cc597dfc227e00c4e5:server/ocserverd/authz.go |
rg -n --fixed-strings 'root CLAUDE.md §5'

It returns the pre-edit authz.go line 4. The post-edit root-old-marker scan returns zero, while local spec/mcp.md §5, nested cli/CLAUDE.md §5, and server/CLAUDE.md §8 anchors remain intentionally out of scope.

One entry below equals one root numeric occurrence. The 69 surviving-content inventory is:

  • Makefile:163 (§10)
  • bin/tests/ci-success-marker.sh:8 (§8)
  • conformance/test_auth_matrix.py:1177 (§14)
  • conformance/test_sse.py:168 (§13)
  • conformance/test_tasks.py:324 (§14)
  • conformance/test_tasks.py:1461 (§14)
  • docs/design/T-40f0-history-diff-ux.md:3 (§8)
  • docs/design/T-40f0-history-diff-ux.md:30 (§13)
  • docs/design/T-f059-scheduled-message.md:501 (§12)
  • docs/design/worker-panel-parity.md:72 (§13)
  • docs/design/worker-panel-parity.md:100 (§13)
  • docs/design/worker-panel-parity.md:215 (§13)
  • docs/design/worker-panel-parity.md:245 (§13)
  • docs/dev/README.md:223 (§13; local spec/mcp.md §5 excluded)
  • docs/dev/README.md:273 (§13)
  • e2e_test/seven_gate/actors/live.sh:150 (§13)
  • e2e_test/seven_gate/run.sh:60 (§13)
  • e2e_test/tests_guard/run.sh:2836 (§13)
  • frontend/src/api/adapter.ts:1350 (§13)
  • frontend/src/api/docCap.ts:14 (§13)
  • frontend/src/api/generated/schema.ts:3361 (§14)
  • frontend/src/api/generated/schema.ts:7203 (§12)
  • frontend/src/api/generated/schema.ts:7218 (§12)
  • frontend/src/api/generated/schema.ts:8762 (§14)
  • frontend/src/components/WorkerDetailPanel.tsx:51 (§13)
  • frontend/src/components/WorkerDetailPanel.tsx:242 (§13)
  • server/ocserverd/api_chat.go:721 (§14)
  • server/ocserverd/api_chat_id_identity_ta828_test.go:32 (§13)
  • server/ocserverd/api_helpers.go:42 (§14)
  • server/ocserverd/api_monitoring.go:226 (§13)
  • server/ocserverd/api_replycards.go:999 (§14)
  • server/ocserverd/api_tasks.go:395 (§14)
  • server/ocserverd/api_tasks.go:1232 (§14)
  • server/ocserverd/api_tasks.go:1922 (§14)
  • server/ocserverd/api_tasks.go:1972 (§14)
  • server/ocserverd/api_tasks.go:2694 (§14)
  • server/ocserverd/api_tasks.go:2726 (§14)
  • server/ocserverd/api_tasks.go:2776 (§14)
  • server/ocserverd/api_tasks_note.go:32 (§14)
  • server/ocserverd/api_tasks_test.go:2088 (§14)
  • server/ocserverd/authz.go:4 (§14; §5 is in the moved-door list below)
  • server/ocserverd/authz_surface_gate_test.go:356 (§14)
  • server/ocserverd/authz_surface_gate_test.go:417 (§14)
  • server/ocserverd/authz_surface_gate_test.go:440 (§14)
  • server/ocserverd/authz_surface_gate_test.go:674 (§14)
  • server/ocserverd/authz_surface_gate_test.go:680 (§14)
  • server/ocserverd/authz_surface_gate_test.go:690 (§14)
  • server/ocserverd/authz_surface_gate_test.go:713 (§14)
  • server/ocserverd/dal_task_artifacts.go:25 (§14)
  • server/ocserverd/main.go:8 (§10)
  • server/ocserverd/member_resume_summary_t8b0d_test.go:197 (§14)
  • server/ocserverd/migrations/00022_task_artifact.sql:35 (§14)
  • server/ocserverd/ocapi_gen.go:2189 (§12)
  • server/ocserverd/ocapi_gen.go:2198 (§12)
  • server/ocserverd/ocapi_gen.go:2960 (§14)
  • server/ocserverd/routes.go:1326 (§14)
  • server/ocserverd/routes.go:1435 (§14)
  • server/ocserverd/routes.go:1538 (§14)
  • server/ocserverd/routes.go:1554 (§14)
  • server/ocserverd/routes.go:1567 (§14)
  • server/ocserverd/routes.go:1579 (§14)
  • server/ocserverd/routes_t6020_governance_test.go:66 (§13)
  • server/ocserverd/sse_topics_spec_test.go:20 (§13)
  • server/ocserverd/wire.go:1387 (§12)
  • server/ocserverd/wire.go:1470 (§12)
  • spec/openapi.json:4987 (§12)
  • spec/openapi.json:5011 (§12)
  • spec/openapi.json:7453 (§14)
  • spec/openapi.json:17680 (§14)

The 5 moved-door occurrences are:

  • cli/ocwarden/CUTOVER.md:30, old §6 → 核心不變量/token 權威在 server
  • server/ocserverd/api_taskmanuals.go:167, old §4 → 核心不變量/授權單一化
  • server/ocserverd/authz_surface_gate_test.go:371, old §4 → 核心不變量/授權單一化
  • server/ocserverd/authz_surface_gate_test.go:649, old §4 → 核心不變量/授權單一化
  • server/ocserverd/authz.go:4, old §5 → 核心不變量/授權單一化

The 5 deleted-content occurrences are:

  • docs/design/T-40f0-history-diff-ux.md:129, old §9c
  • docs/design/worker-panel-parity.md:151, old §9(a)
  • frontend/recon-out/T-e4ae-independent-review.md:24, old §9 heading
  • server/ocserverd/member_ownerop_winddown.go:100, old §9c
  • server/ocserverd/member_ownerop_winddown.go:142, old §9c

All five now point to the five-point code-hygiene list in OffiCraft · 開發 manual §7. Therefore the occurrence-level denominator is reproducibly 69 + 5 + 5 = 79; the earlier 80/79 statement was missing the distinction between raw marker occurrences and the excluded local anchor, and is now clarified here.

Reviewer correction on blocker 3

The reviewer reran the exact GitHub compare for 7f95494...7f6297d and confirmed: 40 changed files, 78 deleted lines containing §, 80 § occurrences, exactly two multi-marker lines, and 79 root occurrences after excluding only local spec/mcp.md §5. Blocker 3 is withdrawn; 79 and the 69 + 5 + 5 classification are correct. The reproducibility command, positive control, and complete inventory above remain as the evidence.

Current exact-head cloud run 32380835762 is completed success for 1dcd590. The two PR-only jobs auto-beta and notify-main-red are skipped by trigger policy; all required PR checks pass.

Evidence command correction

The previous PR body command used the literal pattern spec/mcp.md §5, which does not match the actual Markdown link form spec/mcp.md §5. The body command is now corrected to:

local += gsub(/spec\/mcp\.md\]\([^)]*\) §5/, "&", s)

This link-aware match returns local_spec_mcp_§5=1 and root_numeric_reference_occurrences=79, with the same 78 deleted-line and 80 total-occurrence counts. This is an evidence-only PR body correction; no source file or PR diff changed.

pkyosx added 3 commits August 20, 2026 22:11
[how] replace surviving and moved doors with stable titles, route deleted code-hygiene references to the development manual, and regenerate OpenAPI artifacts
[how] remove the extra indentation introduced while replacing a root charter reference
[how] replace the two nonexistent PR-validation labels with the current section title
@pkyosx

pkyosx commented Sep 10, 2026

Copy link
Copy Markdown
Owner Author

Cross-PR integration note from the independent review of PR #455: this PR deletes server/ocserverd/authz_surface_gate_test.go. If your branch modifies that file, resolving the resulting modify/delete conflict by accepting the deletion could silently drop your branch's authz guard assertions. Please preserve and re-home the guards from your branch when resolving, rather than dropping them because the upstream file is gone. This is a coordination warning, not a claim that your PR has a defect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant