Skip to content

docs: add sampler CI/auth design doc as the global reference#266

Closed
michieldegezelle wants to merge 1 commit into
mainfrom
docs-sampler-learnings
Closed

docs: add sampler CI/auth design doc as the global reference#266
michieldegezelle wants to merge 1 commit into
mainfrom
docs-sampler-learnings

Conversation

@michieldegezelle

Copy link
Copy Markdown
Contributor

Summary

Adds CI_AUTH_SAMPLER_PLAN.md as a single, consolidated reference for the Liquid tests + Liquid sampler CI/auth work — covering:

  • The read-only/decoupled-writer design for Liquid tests, and the serialize/sole-writer design for the sampler (§0-§8, prior sessions)
  • The production build's path through be_marketlu_market pilots, incidents found and fixed along the way (§7, §9)
  • §10 (this session, 2026-07-22): the compact-diff v2 work — results register diff, vanished-output grouping, scope/dependency tier, visual-only tier with field-level view.html diffing, --from-zip (see #265) — plus the 3-repo rollout mechanics learned (unpinned npm install as the whole rollout mechanism, pull_request_review resolving the workflow file from the default branch only — not the PR branch, forking the shared reusable workflow per-caller to test an unmerged branch), two real bugs found and fixed across all copies (a TOCTOU race, a write-back validation gap), and two review findings deliberately left alone as documented tradeoffs rather than auto-patched.

Docs-only, no code changes. Meant as the ongoing reference doc for this work over the coming weeks — not tied to any single PR's lifecycle.

🤖 Generated with Claude Code

Consolidated single-source-of-truth for the Liquid tests + Liquid sampler CI
auth work: read-only/decoupled-writer design for tests, serialize/sole-writer
design for the sampler, the production build across be_market -> lu_market ->
nl_market pilots, real bugs found via live validation and code review, and
this session's compact-diff v2 work (results register, vanished-output
grouping, scope tier, visual-only tier, --from-zip) plus the 3-repo rollout
mechanics (unpinned npm install, pull_request_review resolving from the
default branch only, forking the reusable workflow per-caller for branch
testing). See §10 for the most recent additions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The pull request adds a consolidated plan for Liquid authentication and partner-scoped sampler workflows, covering token ownership, staging execution, GitHub Actions integration, result reporting, compact-diff v2, pilot findings, rollout status, and cleanup sequencing.

Changes

CI authentication and sampler

Layer / File(s) Summary
Authentication strategies and incident fixes
CI_AUTH_SAMPLER_PLAN.md
Documents cron-based token writing, refresh-token stripping for readers, and safeguards added after shared configuration poisoning.
Sampler workflow design and execution model
CI_AUTH_SAMPLER_PLAN.md
Defines staging sampler execution, partner scoping, firm-ID requirements, concurrency, backend collision handling, result surfacing, and implementation phases.
Production action wiring and pilot validation
CI_AUTH_SAMPLER_PLAN.md
Specifies workflow wrappers, PR classification, secret handling, token write-back gates, result comments, retention, and pilot validation findings.
Compact-diff rollout and correctness findings
CI_AUTH_SAMPLER_PLAN.md
Describes compact-diff v2, report expiry behavior, GitHub Actions constraints, write-back issues, rollout status, and cleanup sequencing.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description has a useful summary, but it omits the required Testing Instructions and both checklist sections from the template. Add the missing Testing Instructions and complete the Author/Reviewer checklist sections, or explain why they do not apply.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately describes the main change: adding a consolidated sampler CI/auth design doc.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-sampler-learnings

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CI_AUTH_SAMPLER_PLAN.md`:
- Around line 138-143: Update the fenced code blocks in CI_AUTH_SAMPLER_PLAN.md
for the results.zip tree listing and the gh pr edit re-trigger commands to
include language identifiers: use text for the listing and shell or bash for the
CLI commands.
- Around line 317-320: Update the steady-state bullet in the D7 section to mark
the “partner key has no TTL” premise as superseded or corrected, consistent with
the surrounding corrections. State that the partner API key expires after 24
hours but self-heals through digest matching and /refresh_api_key, while
preserving the conclusion that no routine manual work is required.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 36431cef-82ce-4464-9450-d5ddfdcfa956

📥 Commits

Reviewing files that changed from the base of the PR and between 3bfdeb7 and c8843bc.

📒 Files selected for processing (1)
  • CI_AUTH_SAMPLER_PLAN.md

Comment thread CI_AUTH_SAMPLER_PLAN.md
Comment on lines +138 to +143
```
results/
liquid_comparison_report.html # the diff SUMMARY (1.9 KB when 0 changed; 1.84 MB at 32 changed)
sample_entry_ids.yml # the sampled entries
output/{account,reconciliation}_entries/<id>/{before,after}/{rendered_text.md,*.liquid,*.json,*.html} # 154 MB raw
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add language identifiers to fenced code blocks.

markdownlint flags both blocks (results.zip contents and the gh pr edit re-trigger commands) as missing a language tag. Use text for the tree listing and shell/bash for the CLI commands.

Also applies to: 244-247

🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 138-138: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CI_AUTH_SAMPLER_PLAN.md` around lines 138 - 143, Update the fenced code
blocks in CI_AUTH_SAMPLER_PLAN.md for the results.zip tree listing and the gh pr
edit re-trigger commands to include language identifiers: use text for the
listing and shell or bash for the CLI commands.

Source: Linters/SAST tools

Comment thread CI_AUTH_SAMPLER_PLAN.md
Comment on lines +317 to +320
- **Steady-state ("does this need any ongoing manual work?", resolved 2026-07-10): NO.**
`SF_BASIC_AUTH` is permanent (beta is confirmed permanent; alpha reuses the same value). The
partner key has no TTL and self-heals via write-back, so there is no routine per-run or
per-week/month manual step. Write-back authenticates as `REPO_ACCESS_TOKEN`, a **1-year PAT**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Stale "no TTL" claim not reconciled with the correction above it.

This bullet still states "Steady-state ("does this need any ongoing manual work?", resolved 2026-07-10): NO." ... "The partner key has no TTL and self-heals via write-back, so there is no routine per-run or per-week/month manual step." This directly contradicts the correction a few lines above in the same D7 block: "CORRECTED (2026-07-15): the partner api_key DOES expire — TTL is 24h." The "no TTL" claim below was wrong and this contradicts the "sampler needs no cron" conclusion it drove; superseded by §8's decision. Unlike the other superseded claims in this section, this bullet isn't struck through or annotated as corrected, so a reader skimming just this line would take the disproven premise as current fact.

Consider adding a strikethrough/correction note here consistent with the rest of D7 (the corrected conclusion is still true — self-heals via digest-match on /refresh_api_key — but the "no TTL" reasoning is outdated).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CI_AUTH_SAMPLER_PLAN.md` around lines 317 - 320, Update the steady-state
bullet in the D7 section to mark the “partner key has no TTL” premise as
superseded or corrected, consistent with the surrounding corrections. State that
the partner API key expires after 24 hours but self-heals through digest
matching and /refresh_api_key, while preserving the conclusion that no routine
manual work is required.

@michieldegezelle
michieldegezelle deleted the docs-sampler-learnings branch July 23, 2026 11:16
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