Skip to content

test(sandbox): record the credential-redaction switch in the leaf-only ratchet - #14042

Closed
pepmach wants to merge 1 commit into
mainfrom
fix/leaf-only-ratchet-credential-redaction
Closed

pepmach wants to merge 1 commit into
mainfrom
fix/leaf-only-ratchet-credential-redaction

Conversation

@pepmach

@pepmach pepmach commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

main is red. On 5c66a72625 (ci.yml run 36200986526, job Backend Tests (3.12, 8)) test/test_sandbox_protected_name_holds.py::TestLeafOnlyPopulationIsRecorded::test_leaf_only_count_has_not_grown fails for every tier: "cc now holds 245 protected names by their own leaf name only, up from 242" (standard 238 vs 235, strict 246 vs 243).

Why it matters

Every PR that lands on main now inherits a red backend shard, so a real regression in the sandbox tests would be indistinguishable from this one until the ratchet describes the population that ships.

What changed (motivation → approach → change)

Two PRs landed thirteen seconds apart and each was green alone. #13935 pinned the leaf-only population at EXPECTED = {"standard": 235, "cc": 242, "strict": 243}. #13685 (the owner's credential-redaction switch) added credential_redaction.json to the protected-leaf sets in src/kiro_crew/sandbox.py, modelled on file_delivery_consent.json. Together the ratchet is over by exactly that name: three spellings per tier (~/.kiro/crew, ~/.kirocrew, KIROCREW_HOME), measured by running the test's own _split(tier) at 2a4457f9f2 and at the current tip and diffing the lists. Nothing else changed in any tier.

This PR is test-only. EXPECTED moves to the measured 238 / 245 / 246 and its comment names the leaf and its hold class. sandbox.py is untouched. Whether credential_redaction.json should move under an enclosing directory mask instead of a leaf hold is the maintainers' decision and is tracked as a follow-up, not decided here.

Backwards compatibility

Compatible: a test constant moves to the population main already ships; no runtime code changes.

Tests

  • test/test_sandbox_protected_name_holds.py -n0: red on the current tip, green with this change (the whole file, all three tiers).
  • test/test_sandbox_governance_mask.py -n0: green, unchanged (649 tests across the two files).

Manual verification

N/A — the delta was proven by running _split(tier) before and after the two merges; the only added names are credential_redaction.json entries.

Related Issues

no linked issue: heal for the red main run 36200986526; the leaf-vs-mask question is filed separately by the conductor.

Pattern harvest

Rule candidate: review-prompt
Pattern: two green PRs that both touch a ratcheted population land in one merge burst and the ratchet is over by the second PR's addition; the merge queue or a post-merge check should re-run a population ratchet on the actual main tip, not on each PR's own merge ref.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

…y ratchet

Heal for the red main run 36200986526 on 5c66a72, job
Backend Tests (3.12, 8): TestLeafOnlyPopulationIsRecorded reports every
tier three names over EXPECTED.

Cause: #13685 (the owner's credential-redaction switch) added
credential_redaction.json to sandbox.py's protected-leaf sets, modelled
on file_delivery_consent.json, and landed beside #13935, which pinned the
leaf-only population at 235/242/243. Each PR was green alone; together
the ratchet is over by exactly the new name, in its three spellings per
tier (~/.kiro/crew, ~/.kirocrew, KIROCREW_HOME).

Test-only: EXPECTED moves to the measured 238/245/246 and the comment
names the leaf and its hold class. sandbox.py is untouched. Whether
credential_redaction.json should move under an enclosing directory mask
is the maintainers' decision, tracked as a follow-up.
@pepmach
pepmach requested review from a team and hoang-phan98 September 26, 2026 00:05
@pepmach

pepmach commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

Intent: Turn main green again by recording, in the leaf-only ratchet, the credential_redaction.json protected name that the credential-redaction switch (#13685) added beside the ratchet's pin (#13935). Test-only.
Not a goal: Deciding whether credential_redaction.json should be held by an enclosing directory mask instead of its leaf name, or touching src/kiro_crew/sandbox.py at all -- that is the maintainers' call, tracked separately.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 7b53f9ab8896ec8ee5cfa72829b06534b4a8ba7c — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify the leaf-vs-mask follow-up issue actually exists — the description says "filed separately by the conductor" but links no issue number.

[DESIGN-REVIEWED] 7b53f9a

@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 7b53f9ab8896ec8ee5cfa72829b06534b4a8ba7c and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7b53f9a

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 7b53f9ab8896ec8ee5cfa72829b06534b4a8ba7c: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed 7b53f9ab8896ec8ee5cfa72829b06534b4a8ba7c — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 7b53f9a

Verdict parsed from the review's SHA-scoped output markers for commit 7b53f9ab8896ec8ee5cfa72829b06534b4a8ba7c.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 7b53f9ab8896ec8ee5cfa72829b06534b4a8ba7c: <one-sentence reason>

@pepmach

pepmach commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate: bolichen97's #14041 records the same three leaf-only counts and is the owner's heal for #14044 (the credential_redaction.json leaf from #13685 against the ratchet #13935 pinned). This branch is withdrawn; nothing here is needed once #14041 lands.

@pepmach pepmach closed this Sep 26, 2026
@pepmach
pepmach deleted the fix/leaf-only-ratchet-credential-redaction branch September 26, 2026 00:31
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 26, 2026
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