Skip to content

Commit f7e5ea6

Browse files
chore(tooling): refresh managed config to current Vergil tooling/actions (#314)
* chore(tooling): refresh managed config to current Vergil tooling/actions Items 1/3/6/7 of the fleet refresh (epic mq-rest-admin-project/.github#14): marketplace -> vergil-claude-plugin; embed canonical CLAUDE.md template (+ vrg-docker-run -> vrg-container-run); ignore .vergil/; cd.yml release uses secrets: inherit (fixes CD startup_failure). Hook guard (item 2) already landed via #312. audit COMPLIANT; vrg-validate passes. Refs #313. * fix(security): invoke bash by absolute path in integration test CodeQL java/relative-path-command flagged ProcessBuilder("bash", ...) in MqRestSessionIT (relative command name is PATH-hijackable). Use the absolute /bin/bash. Refs #313. * chore(ci): re-trigger CI after transient maven-central resolution flake Empty commit to re-run CI. A prior run failed in checkstyle:check with a transient 'Failed to read artifact descriptor for maven-reporting-api:jar:4.0.0' (Maven Central fetch hiccup), unrelated to the changes here. Refs #313. --------- Co-authored-by: Phillip Moore <w.phillip.moore@gmail.com>
1 parent 23bd93b commit f7e5ea6

5 files changed

Lines changed: 39 additions & 15 deletions

File tree

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"vergil-marketplace": {
2222
"source": {
2323
"source": "github",
24-
"repo": "vergil-project/vergil-plugin"
24+
"repo": "vergil-project/vergil-claude-plugin"
2525
}
2626
}
2727
},

.github/workflows/cd.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,4 @@ jobs:
3030
language: java
3131
container-tag: "17"
3232
registry-publish: true
33-
secrets:
34-
APP_CLIENT_ID: ${{ secrets.APP_CLIENT_ID }}
35-
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
33+
secrets: inherit

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,6 @@ __pycache__/
8989
.mq-rest-admin-common
9090
docs/site/site/
9191
.worktrees/
92+
93+
# Vergil tooling scratch (PR/session working dir)
94+
.vergil/

CLAUDE.md

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,27 @@ on-ramp.
3636
### Structure
3737

3838
```text
39-
~/dev/github/mq-rest-admin-java/ ← sessions ALWAYS start here
39+
<project-root>/ ← sessions ALWAYS start here
4040
.git/
41-
CLAUDE.md, src/, … ← main worktree (usually `develop`)
42-
.worktrees/ ← container for parallel worktrees
43-
issue-261-adopt-worktree-convention/ ← worktree on feature/261-...
41+
CLAUDE.md, ← main worktree (usually `develop`)
42+
.worktrees/ ← container for parallel worktrees
43+
issue-<N>-<short-slug>/ ← worktree on feature/<N>-<short-slug>
4444
4545
```
4646

4747
### Rules
4848

4949
1. **Sessions always start at the project root.**
50-
`cd ~/dev/github/mq-rest-admin-java && claude` — never from inside
51-
`.worktrees/<name>/`. This keeps the memory-path slug stable and shared.
50+
Never start Claude from inside `.worktrees/<name>/`. This keeps the
51+
memory-path slug stable and shared.
5252
2. **Each parallel agent is assigned exactly one worktree.** The session
5353
prompt names the worktree (see Agent prompt contract below).
5454
- For Read / Edit / Write tools: use the worktree's absolute path.
5555
- For Bash commands that touch files: `cd` into the worktree first,
5656
or use absolute paths.
5757
3. **The main worktree is read-only.** All edits flow through a worktree
5858
on a feature branch — the logical endpoint of the standing
59-
"no direct commits to `develop`" policy.
59+
"no direct commits to develop" policy.
6060
4. **One worktree per issue.** Don't stack in-flight issues. When a
6161
branch lands, remove the worktree before starting the next.
6262
5. **Naming: `issue-<N>-<short-slug>`.** `<N>` is the GitHub issue
@@ -70,22 +70,44 @@ placeholders):
7070
```text
7171
You are working on issue #<N>: <issue title>.
7272
73-
Your worktree is: /Users/pmoore/dev/github/mq-rest-admin-java/.worktrees/issue-<N>-<slug>/
73+
Your worktree is: <project-root>/.worktrees/issue-<N>-<slug>/
7474
Your branch is: feature/<N>-<slug>
7575
7676
Rules for this session:
7777
- Do all git operations from inside your worktree:
78-
cd <absolute-worktree-path> && git <command>
78+
cd <absolute-worktree-path> && vrg-git <command>
7979
- For Read / Edit / Write tools, use the absolute worktree path.
8080
- For Bash commands that touch files, cd into the worktree first
8181
or use absolute paths.
8282
- Do not edit files at the project root. The main worktree is
8383
read-only — all changes flow through your worktree on your
8484
feature branch.
85+
- When you need to run validation, run it from inside your worktree
86+
(vrg-container-run mounts the current directory).
8587
```
8688

8789
All fields are required.
8890

91+
## Shell command policy
92+
93+
Use `vrg-git` instead of `git` for all git operations. Use `vrg-gh`
94+
instead of `gh` for all GitHub CLI operations. These wrappers enforce
95+
subcommand allowlists, flag deny lists, and credential selection.
96+
97+
Raw `git` and `gh` are denied by the permission model. If a command
98+
is not available through the wrappers, explain the situation to the
99+
human who can run it directly via `! <command>` in the prompt.
100+
101+
## Validation
102+
103+
```bash
104+
vrg-container-run -- vrg-validate
105+
```
106+
107+
This is the **only** validation command. Do not run individual linters,
108+
formatters, or other tools outside of `vrg-validate`. If a tool is not
109+
invoked by `vrg-validate`, it is not part of the validation pipeline.
110+
89111
## Project Overview
90112

91113
Java wrapper for the IBM MQ administrative REST API, ported from `pymqrest` (Python). Provides method-per-command API (`displayQueue()`, `defineQlocal()`, etc.) with attribute mapping between snake_case and MQSC parameter names.
@@ -118,7 +140,7 @@ Workflow: `.github/workflows/ci.yml`.
118140
### Validation
119141

120142
```bash
121-
vrg-docker-run -- vrg-validate # Full validation (runs in dev container)
143+
vrg-container-run -- vrg-validate # Full validation (runs in dev container)
122144
```
123145

124146
### Build and Validate

src/test/java/io/github/mqrestadminproject/mq/rest/admin/MqRestSessionIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,8 @@ REST_BASE_URL, QM1_NAME, new LtpaAuth(ADMIN_USER, ADMIN_PASSWORD))
673673
// -------------------------------------------------------------------------
674674

675675
private static void runScript(Path script) throws IOException, InterruptedException {
676-
ProcessBuilder pb = new ProcessBuilder("bash", script.toString());
676+
// Absolute path avoids PATH-hijack (CodeQL java/relative-path-command).
677+
ProcessBuilder pb = new ProcessBuilder("/bin/bash", script.toString());
677678
pb.inheritIO();
678679
pb.directory(REPO_ROOT.toFile());
679680
int exitCode = pb.start().waitFor();

0 commit comments

Comments
 (0)