Skip to content

fix(tooling): patch Markdown parser with verified CI lock - #284

Merged
pranems merged 3 commits into
masterfrom
vprane/scimserver/containers-doc-tooling-security-20261123
Nov 23, 2026
Merged

pranems merged 3 commits into
masterfrom
vprane/scimserver/containers-doc-tooling-security-20261123

Conversation

@pranems

@pranems pranems commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Patch the root documentation parser to Markdown-it 14.3.3 using an authenticated CI-generated lock, without changing application dependencies, application version 0.55.70, or Mermaid 11.17.0.

The root audit moves from one High/one Moderate/two Low to zero High/one Moderate/two Low. This is a tooling-only rollback unit, not shipping, performance, dev or Docker Desktop removal acceptance.

Linked Defect / Plan Reference

  • DELIVERY_PLAN.md defect ID: N/A; root-tooling advisory discovered during container migration qualification.
  • Audit doc reference: Root Markdown tooling recovery and RCA.
  • ADR (if applicable): N/A; retain the existing CI-only root regeneration mechanism.

TDD Process

  • RED test written first; observed it fail for the expected reason
  • GREEN: minimal implementation that turns the test green
  • Refactor (if any) keeps the test green
  • Permanent regression guard added (where applicable - see existing patterns in api/src/security/)

Manifest RED: expected ^14.3.3, received ^14.3.0. Locked RED before artifact import: the same mismatch in the root lock. Both pass after exact artifact import and fresh installation. The existing tooling contract additionally checks the actual installed parser and successful complete npm ls --all.

The actual installed-root check stays in root tooling, not API-only units, avoiding a new root-install dependency in API CI jobs.

Feature / Bug-Fix Commit Checklist (standing rule)

Every behavioral change must include all that apply. Tick or strike through with N/A + reason.

  • Unit Tests - service-level and controller-level coverage of the new behavior. Two dependency regression tests; services/controllers unchanged.
  • E2E Tests - end-to-end spec under api/test/e2e/ exercising the feature through HTTP. N/A for new HTTP coverage: no API behavior changes; the normal hook still executes the existing reduced HTTP suite.
  • Live Integration Tests - new section in scripts/live-test.ps1 runnable against local + Docker + Azure. N/A: root documentation dependency only; no runtime/live-test change in this PR.
  • Feature Documentation - dedicated doc in docs/ with architecture, RFC references, Mermaid diagrams, test coverage. Updated the existing supply-chain policy/RCA rather than creating duplicate architecture or protocol documentation.
  • INDEX.md Update - add the new doc reference to docs/INDEX.md. N/A: no new feature document; existing indexed policy updated.
  • CHANGELOG.md Update - [Unreleased] entry with full test counts and feature summary
  • Session & Context Updates - Session_starter.md and docs/CONTEXT_INSTRUCTIONS.md
  • Version Management - bump api/package.json (and any other version refs) when behavior changed. N/A for product bump: no application change; the root-only parser range and CI lock change.
  • Response Contract Tests - API responses contain ONLY documented fields (key allowlist assertion at unit + E2E + live). N/A: no API response change.

Validation Output

Final normal Fast explicit-ref push: all 29 gates PASS at 58695810.
Final API: 6,274/6,274 PASS, 220 suites.
Final reduced HTTP: 2,519 PASS, 45 known skips, 120 passing/4 skipped suites.
Bootstrap normal Fast: 29 gates PASS in 738.9 seconds.
Bootstrap API: 6,273/6,273 PASS, 220 suites.
Bootstrap reduced HTTP: 2,519 PASS, 45 known skips, 120 passing suites.
Focused Markdown manifest/lock: 2/2 PASS.
Root artifact/installed-tree controls: 23/23 PASS.
Root locked audit: zero High/Critical, one Moderate, two Low.
Exact-tip PR CI: all six checks PASS.
CI API: 220 suites/6,274 tests PASS.
CI reduced HTTP: 2,519 PASS, 45 known skips.
CI web: 126 files/1,664 tests PASS.

Exact focused commands and results:

  • Root npm ci --no-audit --no-fund: PASS, 157 packages; imported lock bytes unchanged.
  • node scripts\test-lockfile-regeneration.mjs: PASS, 23 controls.
  • API npm test -- --runInBand --runTestsByPath src\security\markdown-tooling-dependency.spec.ts: PASS, two tests.
  • Root npm audit --json: completed with zero High/Critical, one Moderate and two Low; its nonzero exit for remaining findings is not described as an entirely clean audit.
  • $env:PREPUSH_MODE='Fast'; git push origin HEAD:refs/heads/vprane/scimserver/containers-doc-tooling-security-20261123: PASS, all 29 normal hook gates; local, upstream and remote independently match full 5869581067ba695a75fe3140bc30eb7df526b404. No bypass.

CI-only lock provenance:

  • Root-only regeneration run 45275004952, successful on exact source 8d9eebdc409dc9c3c4aa6c8567b2b0e1b9b6f970.
  • Artifact 14865984488; ZIP SHA-256 64f40dda5b516e27c62350fe83631509c74f021848d3a768f6febc9e7b9ec6fe, matched GitHub's immutable digest.
  • Imported lock SHA-256 80a519be2009bd87db82fcdd5f6cff09dcb0bd9ceec2eb9fd8f178a674f75bc4.
  • All 157 entries use public npm URLs/SHA-512. Full union admits only the root range, Markdown 14.3.0 to 14.3.3 and an exact unchanged Mermaid parser 1.2.1 relocation. No unrelated package versions or API/web locks changed.
  • Changed-entry publication ages: Markdown 38.84 days, relocated parser 96.54 days; both exceed seven days.

Exact-tip PR workflow 45278667715 completed successfully on 5869581067ba695a75fe3140bc30eb7df526b404: runtime contracts, validation and test-image build/push all PASS, including container smoke and HIGH/CRITICAL-gating Trivy. Separate docs freshness and both CodeQL checks PASS. The image is a nonshipping PR test image, not a merged-master release or deployment.

The first normal bootstrap push correctly failed on the fresh worktree's missing generated Prisma client. Existing client generation repaired the actual build; the failed receipt and prerequisite are retained in the RCA. Unseeded installed-graph drift was rejected rather than committed. No local lock generation, gate weakening or history rewrite.

Standing Rules Acknowledgment

  • No em-dash (Unicode U+2014) anywhere in the diff. Verified via Select-String -Pattern ([char]0x2014).
  • No git commit --amend on history that has been pushed.
  • No new credentials, tokens, or secrets committed to source. Forbidden patterns regression spec at api/src/security/forbidden-source-patterns.spec.ts will catch known anti-patterns.
  • Migrations are additive-only (expand-contract for column changes). Migration linter at api/src/scripts/lint-migrations.ts enforces this. No migration changes.

Destructive Migration Override (skip if not applicable)

Not applicable: no schema, migration, database or container operation.

  • This PR contains a NEW destructive Prisma migration (DROP TABLE/COLUMN, ALTER COLUMN ... TYPE, RENAME, INSERT ... SELECT FROM)
  • I have set ALLOW_DESTRUCTIVE_MIGRATION=1 in the CI environment for this PR
  • Justification (required if box above is ticked):
    <!-- Why this destructive change is necessary, what the rollback path is, and which release window it ships in -->
    

Reviewer Hint

Diff areas worth special attention from the reviewer:

  • Verify the entire root package-map union, including unchanged parser relocation rather than treating a hoist as a dependency upgrade.
  • Confirm locked and installed assertions are separate, and API-only CI does not require root packages.
  • Preserve Mermaid's exact renderer-compatible pin, API/web dependencies, all hooks and all test thresholds.
  • Self-improvement: applied, default floor/lock and installed-tree controls plus seed/owner lessons. Design disposition: accepted, existing root regeneration and coherent ownership boundaries; no new abstraction.
  • Independent review is still pending. The direct Copilot review endpoint returned HTTP 422 NO_QUOTA_REMAINING; no approval or review completion is inferred from the earlier CLI request's zero exit. A clearly labelled bounded self-review is recorded separately. No merge or review bypass.

Prashant Rane (ALLYIS INC) and others added 3 commits November 23, 2026 15:44
Retain the old root lock until authenticated CI regeneration. Manifest RED/GREEN and seeded owned package graph verification preserve existing guards and application dependencies; this bootstrap is not final locked remediation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain the first blocked Fast push and confirmed generated-client build recovery. Existing gates and dependency locks are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Authenticate root-only CI run 45275004952 artifact and complete package union. Fresh owned npm ci preserves exact lock bytes; manifest/lock regressions, installed full tree and zero High/Critical root audit pass. Mermaid remains 11.17.0; API/web source and locks remain unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pranems

pranems commented Nov 23, 2026

Copy link
Copy Markdown
Owner Author

Exact-tip consolidation self-review

Reviewed source 5869581067ba695a75fe3140bc30eb7df526b404, including the complete root package-map union, the two API metadata-only regression tests, installed-root graph control, dependency provenance and finite documentation claims.

  • No application dependency, application version, Mermaid renderer pin, workflow, hook, deadline, threshold or runtime behavior changes.
  • The only package version change is Markdown-it 14.3.0 to 14.3.3. The Mermaid parser relocation retains its exact entry/version and actual parent resolution.
  • The installed-root/full-tree assertion stays outside API-only units. CI's API-only install therefore does not gain a root installation prerequisite.
  • The authenticated lock matches both committed Git-blob and working-copy bytes. Final normal Fast push passed all 29 gates: 220 API suites/6,274 tests; reduced HTTP 120 passing suites/2,519 tests, plus four suites/45 known skips.
  • Root audit retains one Moderate and two Low; zero High/Critical is not an entirely clean audit claim.
  • No new high-confidence correctness defect found in this bounded self-review.

Self-improvement is applied through the permanent floor/lock and installed-tree controls and documented seed/physical-hoist lessons. Design disposition: accepted, existing cohesive tooling boundaries without a speculative abstraction.

Independent review remains pending. The CLI review-request command exited zero but produced no review/request record. The documented direct Copilot review endpoint then explicitly returned HTTP 422 NO_QUOTA_REMAINING. No review or approval is inferred, and no account substitution or review bypass is attempted. This comment is a self-review, not independent approval.

The optional GitHub event-subscription preview also returned HTTP 403 because it is not enabled for this account. Ordinary authorized PR/check reads remain usable. Existing exact-tip CI continues without duplicate dispatch.

@pranems pranems left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact-tip consolidation self-review

Reviewed source 5869581067ba695a75fe3140bc30eb7df526b404, including the complete root package-map union, the two API metadata-only regression tests, installed-root graph control, dependency provenance and finite documentation claims.

  • No application dependency, application version, Mermaid renderer pin, workflow, hook, deadline, threshold or runtime behavior changes.
  • The only package version change is Markdown-it 14.3.0 to 14.3.3. The Mermaid parser relocation retains its exact entry/version and actual parent resolution.
  • The installed-root/full-tree assertion stays outside API-only units. CI's API-only install therefore does not gain a root installation prerequisite.
  • The authenticated lock matches both committed Git-blob and working-copy bytes. Final normal Fast push passed all 29 gates: 220 API suites/6,274 tests; reduced HTTP 120 passing suites/2,519 tests, plus four suites/45 known skips.
  • Root audit retains one Moderate and two Low; zero High/Critical is not an entirely clean audit claim.
  • No new high-confidence correctness defect found in this bounded self-review.

Self-improvement is applied through the permanent floor/lock and installed-tree controls and documented seed/physical-hoist lessons. Design disposition: accepted, existing cohesive tooling boundaries without a speculative abstraction.

Independent review remains pending. The CLI review-request command exited zero but produced no review/request record. The documented direct Copilot review endpoint then explicitly returned HTTP 422 NO_QUOTA_REMAINING. No review or approval is inferred, and no account substitution or review bypass is attempted. This comment is a self-review, not independent approval.

The optional GitHub event-subscription preview also returned HTTP 403 because it is not enabled for this account. Ordinary authorized PR/check reads remain usable. Existing exact-tip CI continues without duplicate dispatch.

Normal merge decision

The later merge-policy check verified the actual protected master configuration: strict status checks validate, build-and-push and Analyze (javascript-typescript) are required; required_pull_request_reviews is null. The canonical delivery process section 5.3 requires green exact-tip CI, resolved or explicitly disposed review findings, relevant schema/docs/RCA, coherent scope and no newer remote commit. This exact-tip source review and the six successful checks satisfy those applicable requirements. No schema/migration changes or unresolved source findings exist here.

The earlier report incorrectly promoted unavailable independent review into an additional mandatory merge gate. That extra requirement was not established by the repository policy or protection. Correcting that classification does not create independent approval: this remains a self-review, recorded as COMMENTED, and no approval, admin override, protection change or CI bypass is used. Normal exact-head merge is permitted. Shipping, the complete merged matrix, performance, dev and customer-prod approvals remain separate requirements.

@pranems
pranems merged commit 36d0788 into master Nov 23, 2026
6 checks passed
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