-
Notifications
You must be signed in to change notification settings - Fork 1
Upgrade to Vitest v4 #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Vitest v4 #163
Changes from all commits
0542ecb
03412a9
062b4a7
a725f98
1d9457b
7a3d64a
f09fb1f
8eddc22
10a13ed
1cf72a8
a52ba54
4df547a
0f69bda
726c623
6082b4b
b64a0d0
d9ad039
3ea4ca6
db3f8f3
04d3454
1da6077
2850dd2
757fbee
fabbad4
7b018a9
5f5d5aa
258f9dc
c37c7be
e4ba843
a7fe9d9
79825f5
c41dcf2
3cb424f
16741f3
9ea5cb0
768e7b5
676d524
bbe800e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| // Additional directories that Claude Code can access | ||
| "$schema": "https://json.schemastore.org/claude-code-settings.json", | ||
| "permissions": { | ||
| "additionalDirectories": ["/tmp", "/workspaces"], | ||
| }, | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,6 @@ | |
| // This should only ever be running in a devcontainer, so pretty lenient permissions are allowed | ||
| "$schema": "https://json.schemastore.org/claude-code-settings.json", | ||
| "permissions": { | ||
| "allow": ["Write(/tmp/**)"] | ||
| } | ||
| "allow": ["Write(/tmp/**/*)", "Write(/workspaces/**/tmp/**)", "Write(tmp/**)"], | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Narrow write scope to this repo’s tmp paths.
🤖 Prompt for AI Agents |
||
| }, | ||
| } | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| #!/usr/bin/env python3 | ||
| """Ensure the AI attribution footer is present in a reply file. | ||
|
|
||
| Usage: check-footer.py <file> | ||
|
|
||
| Checks whether the footer is already in the file. If missing, appends it | ||
| with a blank line separator. Prints "present" or "added" to stdout. | ||
| """ | ||
|
|
||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| EXPECTED_ARG_COUNT = 2 | ||
|
|
||
| FOOTER = "*Reply drafted by AI (Claude), reviewed and approved by the author before posting.*" | ||
|
|
||
|
|
||
| def main() -> None: | ||
| if len(sys.argv) != EXPECTED_ARG_COUNT: | ||
| _ = sys.stderr.write(f"Usage: {sys.argv[0]} <file>\n") | ||
| sys.exit(1) | ||
|
|
||
| path = Path(sys.argv[1]) | ||
| try: | ||
| content = path.read_text(encoding="utf-8") | ||
| except OSError as e: | ||
| _ = sys.stderr.write(f"File error for {path}: {e}\n") | ||
| sys.exit(1) | ||
|
|
||
| non_empty_lines = [line.strip() for line in content.splitlines() if line.strip()] | ||
| if non_empty_lines and non_empty_lines[-1] == FOOTER: | ||
| _ = sys.stdout.write("present\n") | ||
| return | ||
|
|
||
| # Ensure a blank line before the footer, then append. | ||
| suffix = "\n" if content.endswith("\n") else "\n\n" | ||
| try: | ||
| _ = path.write_text(content + suffix + FOOTER + "\n", encoding="utf-8") | ||
| except OSError as e: | ||
| _ = sys.stderr.write(f"File error for {path}: {e}\n") | ||
| sys.exit(1) | ||
| _ = sys.stdout.write("added\n") | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scope workspace access to the current repository path only.
Granting
"/workspaces"provides access to all sibling workspaces in the container, which is broader than required for this skill flow and weakens least-privilege boundaries.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who cares, it's a devcontainer
Reply drafted by AI (Claude), reviewed and approved by the author before posting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ejfine, fair point — the container boundary already provides the isolation, so least-privilege concerns about sibling paths under/workspacesdon't apply in a devcontainer context. I'll note this for future reviews.(ᵔᴥᵔ)🐇
✏️ Learnings added