8000 feat(claude): render the work host's planwright overlay from its own work-account item by inkatze · Pull Request #230 · inkatze/dotfiles · GitHub
[go: up one dir, main page]

Skip to content

feat(claude): render the work host's planwright overlay from its own work-account item - #230

Merged
inkatze merged 8 commits into
mainfrom
planwright/flight/mc-dotfiles-ad-hoc-2d5798df
Nov 10, 2026
Merged

inkatze merged 8 commits into
mainfrom
planwright/flight/mc-dotfiles-ad-hoc-2d5798df

Conversation

@inkatze
@inkatze inkatze commented Nov 8, 2026 •
Copy link
Copy Markdown
Owner

The work host now renders its planwright overlay from its own 1Password item in the work account, so it never picks up the program settings the other hosts share. Every other host renders exactly what it did before.

  • roles/claude/defaults/main.yml: claude_planwright_overlay_work_hosts (work) picks the item dotfiles-planwright-overlay-<alias> for listed hosts; everyone else keeps dotfiles-planwright-overlay.
  • roles/claude/tasks/op-render.yml: on a listed host the overlay render passes scripts/op-render.sh --work-account, which reads the item from the account and vault op-work-item names and refuses to run without them instead of falling back to the shared item.
  • Tests: scripts/op-render-test.sh covers --work-account; the new scripts/claude-overlay-render-test.sh runs the real Ansible tasks as each inventory host against a fake op and checks that personal, alt and server render the shared item byte-for-byte as before, that work renders only its own item, and that work without op-work-item fails with no read and nothing written. It runs in CI's lint job.
  • Docs: docs/machine-local-files.md, README.md, CLAUDE.md.

Before the work host's next playbook run after merge: the item dotfiles-planwright-overlay-work must exist in the work account and vault, with flight_pr_hosts and mission_control fields; until then that run fails, by design.

Open items

  • The lefthook.yml entry for the new suite is not in this PR: editing that file was denied by permission settings in the worker session.
  • The prepared command for the mac-offload field edit is not here yet; it is added once verified.
  • Local commits skipped the Ansible-driven pre-commit suites; CI runs them. A likely cause of their local hangs turned up here: scripts/claude-overlay-render-test.sh hung whenever its stdin was an open pipe, and the sibling suites never close stdin either (recorded as an observation, not fixed here).
  • Synced with main twice by merge commits; the latest brings in fix(test): stop the lint job's ansible suites spending a minute per play on fact gathering #232's lint-job speedups. This suite now follows the same pattern: only the env facts, pipelining, a 10-minute step bound, plus </dev/null on its play. CI then caught a bash 3.2 set -u failure on an empty argument array in the suite, fixed in 90e66cb.
  • Review cadence: run 000003: /polish --nested applied one fix (the stdin hang), /panel-review --nested (Gemini, in place of cubic while its quota is reserved) declined one sibling-suite finding as out of scope; no pending sign-off, no open fork. Run 000004 covered the bash 3.2 fix: polish found nothing, Gemini's two findings were false positives. Run 000005: the cubic review was requested and refused on the monthly quota (resumes 2 December 2026), and dotfiles has no PR-Agent workflow yet, so bot-review is recorded skipped. Run 000002's convergence start times were entered by hand; later runs' were captured before each step ran.
Step records

Steps at pre-implementation (run 000001)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
none

Ended on f64bcc0e5dbc.

Steps at pre-ci (run 000002)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
none

Ended on feca78791206.

Steps at convergence (run 000002)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
1 polish skill polish in-session in-session feca787 2026-11-09T00:00:00Z 2026-11-09T19:30:16Z applied polish --nested converged in 2 iterations, run in-session (isolated hosting degraded: brief requires inline); 0 applied, 3 declined with rationale, 0 sign-off, 0 forks
2 panel-review skill panel-review in-session in-session feca787 2026-11-09T11:30:00Z 2026-11-09T19:38:56Z passed panel-review --nested (gemini) converged in 1 iteration, in-session; 0 applied, 1 declined, 7 dropped as false positives

Ended on feca78791206.

Steps at pre-pr (run 000002)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
none

Ended on feca78791206.

Steps at post-pr (run 000002)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
1 bot-review skill bot-review in-session in-session feca787 2026-11-09T19:42:51Z 2026-11-09T19:42:51Z skipped: answered (operator standing rule cubic-quota (r-15): no cubic review on dotfiles PRs until the quota resets; the Gemini panel review stands in; no bot review or comment exists on the PR)

Ended on feca78791206.

Steps at pre-implementation (run 000003)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
none

Ended on 433d66d021b4.

Steps at pre-ci (run 000003)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
none

Ended on f7443942f59c.

Steps at convergence (run 000003)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
1 polish skill polish in-session in-session f744394 to 4004575 2026-11-09T21:34:33Z 2026-11-09T21:54:06Z applied converged in 2 iterations; 1 applied (e370e63), 0 declined, 0 pending sign-off; 1 observation (4004575)
2 panel-review skill panel-review in-session in-session 4004575 2026-11-09T21:55:40Z 2026-11-09T22:01:37Z passed gemini, converged in 1 iteration; 0 applied, 1 declined (sibling suites stdin, out of scope, observation recorded)

Ended on 400457528201.

Steps at pre-pr (run 000003)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
none

Ended on 400457528201.

Steps at post-pr (run 000003)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
1 bot-review skill bot-review in-session in-session 4004575 2026-11-09T22:04:00Z 2026-11-09T22:04:00Z skipped: answered (operator standing rule cubic-quota (r-15): no cubic review on dotfiles PRs until the quota resets; the Gemini panel review stands in; no bot review or comment exists on the PR)

Ended on 400457528201.

Steps at pre-implementation (run 000004)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
none

Ended on 90e66cb55f93.

Steps at pre-ci (run 000004)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
none

Ended on 90e66cb55f93.

Steps at convergence (run 000004)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
1 polish skill polish in-session in-session 90e66cb 2026-11-09T22:11:39Z 2026-11-09T22:12:18Z passed converged in 1 iteration over 4004575..90e66cb; 0 findings (no other bash 3.2 or BSD hazards in the suite)
2 panel-review skill panel-review in-session in-session 90e66cb 2026-11-09T22:12:35Z 2026-11-09T22:15:36Z passed gemini 52s, converged in 1 iteration; 0 applied, 2 dropped as false positives (word splitting and globbing claims on the bash 3.2 empty-array idiom, disproved by a run keeping "B=Work Vault" and "C=*" whole)

Ended on 90e66cb55f93.

Steps at pre-pr (run 000004)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
none

Ended on 90e66cb55f93.

Steps at post-pr (run 000004)

# Step Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
1 bot-review skill bot-review in-session in-session 90e66cb 2026-11-09T22:16:57Z 2026-11-09T22:16:57Z skipped: answered (operator standing rule cubic-quota (r-15): no cubic review on dotfiles PRs until the quota resets; the Gemini panel review stands in; no bot review or comment exists on the PR)

Ended on 90e66cb55f93.

Steps at post-pr (run 000005)

# St 8000 ep Kind Target Hosting Backend Session Head Start End Outcome Excerpt Output
1 bot-review skill bot-review in-session in-session 90e66cb 2026-11-09T23:46:58Z 2026-11-09T23:56:03Z skipped: answered (cubic monthly quota reached (40,041 of 40,000 lines; resumes 2 December 2026); dotfiles has no PR-Agent workflow yet)

Ended on 90e66cb55f93.

Audit record

Convergence: /polish --nested (self-review passes inline, nested; base origin/main @ 0dcc648)

Mode: nested. Discovery walked inline (declared scoping: 9 files, ~270 changed lines, mostly a fixture suite, config and prose). No active kickoff brief (flight branch), so Agent-resolvable was unavailable. Iterations: 2; converged (iteration 2 produced no new disposition).

Lens Findings Notes
Correctness, logic, edge cases none --work-account arg parse, work_refs/work_set/work_on split, and the item/argv Jinja agree with every fixture case
Security none work read never carries the service-account token (asserted in op-render section 29); no fallback to the personal vault on a failing work read
Error handling and failure modes 1 partial-source message reads "set together or not at all" under --work-account, where "not at all" also fails (declined 2)
Performance none one extra Ansible-driven suite in CI's lint job; runs in seconds
Concurrency / state 1 a host joining the work list keeps a supplement harvested while it rendered the shared item (declined 3)
Naming, readability, structure none no worsening
Documentation none the README, CLAUDE.md and docs rows match the behaviour (no falsified, missing, guard or fork class)
Tests / verification none op-render section 29 and claude-overlay-render-test cover the new behaviour; mutation-checked by the prior worker
Cross-file consistency 1 the new suite is in CI but not in lefthook.yml (declined 1)

Auto-applicable

# Finding Tool + rule cited Fix Commit
none

Agent-resolvable

# Finding Test Before → after CI result Brief alignment Commit
none (no active kickoff brief)

Needs sign-off

# Finding Fix applied Route reason Commit Checklist ID
none

Needs human judgment

# Fork Ladder record Outcome Options
none

Declined log

# Finding Validation summary Rationale Where re-raisable
1 scripts/claude-overlay-render-test.sh has no lefthook.yml entry confirmed: absent from lefthook.yml, present in .github/workflows/test.yml editing lefthook.yml was denied by permission settings earlier; CI runs the suite; the prepared entry is in the PR's open items PR review
2 --work-account with a partial work source says "must be set together or not at all" confirmed in scripts/op-render.sh an operator who then unsets all three gets the explicit --work-account needs ... message naming op-work-item; no wrong action results PR review
3 a host newly added to claude_planwright_overlay_work_hosts carries its existing planwright-overlay.supplement.yml into its first own-item render confirmed: supplement and snapshot paths are keyed on the template, not the item the supplement only holds mission control's writes made on that same host, so nothing reaches it that was not already there; the only listed host is new to the list in this PR PR review

Pending sign-off

none

Pass summary

Tooling: lefthook pre-commit fast hooks green on the merge head (gitleaks, yamllint, shellcheck, ansible-lint, skill-contracts, instruction-budget, op-render, op-token, op-key-sync, playbook-alias, osx-offload-guard, fish-functions-ignore); scripts/op-render-test.sh 260 passed, 0 failed; scripts/claude-overlay-render-test.sh all assertions hold. Excluded locally per the standing rule (CI runs them): skill-contracts-suite, claude-skills-link, copilot-retirement, claude-steps-catalog, syntax-check, git-unattended-auth, cubic-instructions, credential-path-guard, planwright-marketplace. No reverts. Merge resolution: scripts/op-render-test.sh keeps main's overlay-supplement section as 28 and this branch's --work-account section as 29.

Convergence: /panel-review --nested (backend: gemini; base origin/main @ 0dcc648)

Iterations: 1; converged (nothing to apply, no forks; discovery ran on the converging iteration). Gemini wall-clock 182s; outbound prompt gitleaks-scanned clean.

Lens Findings Notes
Correctness, logic, edge cases 0 (1 dropped) "none is set" is reached only when all three variables are empty
Security none backend and local pass agree
Error handling and failure modes 0 (2 dropped) failed_when: false is by design: the later "Fail on any 1Password render or key sync that failed" task stops the play, and the fixture asserts it
Performance 1 Ansible-driven suite adds CI wall-clock (declined 1)
Concurrency / state none
Naming, readability, structure none
Documentation 0 (1 dropped) "fails the play" is true, via the aggregate fail task
Tests / verification 0 (3 dropped) asserted strings exist in scripts/op-render.sh; both suites pass; the second grep short-circuits behind the first
Cross-file consistency 0 (1 dropped) the documented invariant holds (see error-handling row)
Defensive completeness 0 (1 dropped) the partial-source guard is still present for both --work-account and work-reference templates

Auto-applicable

# Lens File:Line Finding Rule cited Backend(s) Validation passes Confidence Recommendation
none

Agent-resolvable

none (no active kickoff brief)

Needs sign-off

none

Needs human judgment

none

Declined log

# Finding Validation summary Rationale Where re-raisable
1 scripts/claude-overlay-render-test.sh runs ansible-playbook once per case, adding CI latency (gemini) confirmed: one play per inventory alias case the cost is the suite's purpose (it drives the real role per host alias), matching the repo's other Ansible-driven suites in the same job; it runs locally in about a minute PR review

Dropped as false positives after three-pass validation (gemini): op-render.sh "none is set" message; docs "fails the play" claim; op-render-test expecting "must be set together"; overlay test expecting a failed play; op-render.yml failed_when: false breaking the invariant; op-render-test second grep stderr; removed partial-variable guard. Each was checked against the current code and both suites' passing runs.

Test command: scripts/op-render-test.sh (260 passed, 0 failed); LC_ALL=C.UTF-8 scripts/claude-overlay-render-test.sh (all assertions hold); lefthook pre-commit fast hooks green. No commits.

Run 000003: /polish --nested (scope 433d66d...4004575, base origin/main @ e296c92)

Discovery inline (2 files, under 20 changed lines). No kickoff brief, so Agent-resolvable was unavailable. Iterations: 2; converged.

Lens Findings Notes
Correctness, logic, edge cases 1 The hang the first fix commit blamed on ANSIBLE_PIPELINING was an open stdin pipe: reproduced with and without pipelining; fixed with </dev/null (e370e63)
Security none Test harness only
Error handling and failure modes none The CI step is now bounded by timeout-minutes
Performance none gather_subset narrowed to env, the only facts op-render reads; pipelining on, matching the sibling suites
Concurrency / state n/a Serial suite
Naming, readability, structure none
Documentation 1 (same finding) Prose falsified: the pipelining comment, replaced
Tests / verification none Suite passes locally with stdin closed and with stdin an open pipe
Cross-file consistency none Sibling suites share the stdin hazard; observation recorded (4004575)

Auto-applicable: 1 applied (e370e63). Needs sign-off: none. Needs human judgment: none. Declined: none. Tooling: lefthook fast hooks green; ansible-lint's one jinja[spacing] warning is main's.

Run 000003: /panel-review --nested (gemini, 27s; converged in 1 iteration)

Lens Findings Notes
Correctness through Tests none
Cross-file consistency + Defensive completeness 1 Sibling ansible suites lack </dev/null

Declined log:

# Lens File:Line Finding Backend(s) Rationale
1 Cross-file consistency, Defensive completeness scripts/claude-overlay-render-test.sh:113 Sibling ansible-driven suites do not close stdin gemini Out of scope: those suites are main's, their hang under an open stdin is untested, and #232 bounds their CI steps. Recorded as an observation for a follow-up.

Run 000004: bash 3.2 fix (4004575...90e66cb)

/polish --nested: 1 iteration, no findings (the suite has no other bash 3.2 or BSD-only constructs; check-bash32.sh lint clean). /panel-review --nested (gemini, 52s): 2 findings dropped as false positives. Gemini said the unquoted outer ${extra[@]+"${extra[@]}"} word-splits and globs elements; a run with elements B=Work Vault and C=* kept both whole, and an empty array expands to nothing under set -u.


Summary by cubic

The work host now renders its planwright overlay from its own 1Password item in the work account, so it never picks up the program settings the other hosts share. Every other host renders exactly what it did before. A new Ansible-driven suite pins both behaviors; it gathers only the env facts, runs bounded in CI, and passes </dev/null so an open stdin cannot hang the play.

Migration

  • Before the work host's next playbook run after merge, create the item dotfiles-planwright-overlay-work in the account and vault op-work-item names, with the flight_pr_hosts and mission_control fields; until then that run fails, by design.

Written for commit 90e66cb. Summary will update on new commits.

View guided diff Turn on auto-fix

…work-account item

A host in claude_planwright_overlay_work_hosts (work) renders the overlay from dotfiles-planwright-overlay-<alias>, read with op-render.sh --work-account from the account and vault op-work-item names, and fails rather than fall back to the shared item. Every other host renders the shared item exactly as before. A new Ansible-driven suite pins both, and the renderer suite covers --work-account.
@inkatze
inkatze commented Nov 9, 2026
Copy link
Copy Markdown
Owner Author

@cubic-dev-ai review this PR

@cubic-dev-ai
cubic-dev-ai Bot commented Nov 9, 2026
Copy link
Copy Markdown

@cubic-dev-ai review this PR

@inkatze cubic can't start this review because your workspace has reached its free monthly review limit. cubic has reviewed 40,041 of the 40,000 allowed lines of code this month. Reviews resume on 2 December 2026 (in 23 days). Paid plans include much higher monthly review limits. Upgrade now to resume reviews.

To help optimise your usage, you can tune cubic to get the most out of your usage limits:

Learn more →

@inkatze
inkatze marked this pull request as ready for review November 9, 2026 23:58
@inkatze
inkatze merged commit 6e0a09b into main Nov 10, 2026
12 checks passed
@inkatze
inkatze deleted the planwright/flight/mc-dotfiles-ad-hoc-2d5798df branch November 10, 2026 00:12
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

0