Repository navigation
fix: approval queue limit, envelope test coverage, example CI and k8s fsGroup - #337
Merged
Merged
Conversation
ALL listed five of the six purposes, so the cross-purpose and signer-kind tests never checked ControlsReport. Add it, and a wildcard-free match that stops compiling when a new purpose is added without updating ALL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SEiXYYveWxqv7a2tV4a3dG
Both checkouts sit in subdirectories, so the workspace root is not a git
repository and gh can't resolve {owner}/{repo}: the comment step failed.
Set GH_REPO, and say that scripts/policy-pr-comment.sh must be copied too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEiXYYveWxqv7a2tV4a3dG
…context The image runs as nonroot uid 65532 and the spool is a PVC, which starts root-owned on EBS. Without fsGroup the spool isn't writable. Match the Helm chart's podSecurityContext. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SEiXYYveWxqv7a2tV4a3dG
The approvable scope read the oldest 500 pending requests and then kept the ones the caller may approve. With more than 500 open requests, an approver whose roles only had newer ones saw an empty queue, and the requested limit was never applied. Select by approvable role and exclude the caller's own requests in SQL, apply the limit there, and keep the per-row check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SEiXYYveWxqv7a2tV4a3dG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SEiXYYveWxqv7a2tV4a3dG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Four independent fixes from a scheduled review of the repository. Each is its own commit. None of them overlap with the open PRs: #331 (five review fixes), #300 (OIDC groups claim), #276 (release) and the dependabot bumps.
limit(access/store.rs,access/mod.rs)scope: approvableread the oldest 500 pending requests across the organisation and then kept the ones the caller may approve.MAX_OPENis 20 per person), an approver whose roles only have newer requests sees an empty queue. The console's "waiting for your decision" count and the approvals tab miss them too, and the requests lapse unseen.limitwas never applied either.lower(requester) <> lower($2), as separation of duties does elsewhere). It applies the limit and keeps the per-rowmay_approvecheck.ControlsReport(limen-session/src/envelope.rs)ALLlisted 5 of the 6 purposes, so the cross-purpose replay test and the signer-kind test never covered the controls report.ControlsReportis now inALL. A new test has a wildcard-freematch, so adding aPurposewithout updatingALLstops it compiling. It also checks that labels are unique.examples/ci/policy-check.yml)head/,base/), so the workspace root isn't a git repository.gh api repos/{owner}/{repo}/…therefore has nothing to fill the placeholders from, becauseghreadsGH_REPO, notGITHUB_REPOSITORY.GH_REPO: ${{ github.repository }}. The workflow header and the guide now say thatscripts/policy-pr-comment.shmust be copied too, since the workflow callshead/scripts/policy-pr-comment.sh.deploy/kubernetes/limen/control-plane.yaml)nonroot(uid 65532), and the spool is avolumeClaimTemplate. A freshly provisioned volume such as EBS is root-owned, so withoutfsGroupthe spool isn't writable.podSecurityContextas the Helm chart's default. The proxy and worker manifests useemptyDirand are left alone.Related: no phase change; bug fixes only.
How it was verified
cargo fmt --all --check: clean.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean.mise.tomlpins, because mise isn't available here. Tests were built withCARGO_PROFILE_DEV_DEBUG=0to fit the disk.cargo test -p limen-session --lib: 26 passed, including the newall_lists_every_purpose_once.cargo test -p limen-control-plane --test access_requests, against a local PostgreSQL 16 (LIMEN_TEST_DATABASE_URL): 15 passed, including the newthe_approval_queue_honours_its_limit_and_skips_your_own.limit: 1returned all 3 requests.yaml.safe_load_all).Not verified
GH_REPOreasoning comes fromgh's documented placeholder resolution.kms/s3, the demos, shellcheck, actionlint and gitleaks were not run (the tools are not installed here).Checklist
cargo fmtandcargo clippy ... -D warningscleandocs/guides/policy-tooling.md(copy the script too)Compatibility and rollback
ListAccessRequestswithscope: approvablenow returns at mostlimitrows (0 means 200), oldest first. The console asks for 100, so an approver with more than 100 waiting sees the oldest 100 and a count of 100, rather than up to 500 rows before.Remaining concerns
SECURITY.md, they were reported to the maintainer privately and are not described here.session_id = 0. That includes the empty incremental fetches consumers send in steady state, so clients fall back to full fetches and lose long-polling. Forwarding them would mean reasoning about broker-side fetch sessions under policy changes, so it was left alone.access::expire, the stalefuzz/Cargo.lock, no shellcheck in CI, and no validation of the alerts or manifests in CI.pipefail,page … | grep -qindemo-phase4.sh(lines 148-159) can misread an early match if a console page exceeds the pipe buffer. That is the same pattern fix: five small correctness fixes from a repository review #331 fixed for log greps. It was not measured.Generated by Claude Code