Skip to content

Sync Claude Code defaults from .github - #8

Closed
edagher92-coder wants to merge 1 commit into
mainfrom
chore/sync-claude-defaults
Closed

edagher92-coder wants to merge 1 commit into
mainfrom
chore/sync-claude-defaults

Conversation

@edagher92-coder

Copy link
Copy Markdown
Owner

Automated propagation of settings + skills from the account .github father repo. Merge to stay current.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T10:39:39.414434Z 87ee0c9 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d96a75d15

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .claude/hooks/README.md
**Clients (each PC, one command):**
```powershell
.\bootstrap.ps1 -OllamaHub http://<your-machine>.<your-tailnet>.ts.net:11434
.\bootstrap.ps1 -OllamaHub http://elzydlab.tail76b098.ts.net:11434

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep private infrastructure identifiers out of this repo

This synchronization reverses the prior privacy scrub (2667faa) by committing the real tailnet hostname; the same diff also restores tailnet IPs, a phone number, and Meta account/app/business identifiers. If this repository is published—as the scrub commit explicitly anticipated—those details become available in clones and forks, exposing internal infrastructure and personal/business identifiers. Restore placeholders here and keep environment-specific values in untracked local configuration.

Useful? React with 👍 / 👎.

@edagher92-coder
edagher92-coder force-pushed the chore/sync-claude-defaults branch 2 times, most recently from 55af73b to e99bb74 Compare October 30, 2026 09:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e99bb74e36

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +49 to +50
-- Revoke direct execution from public roles
revoke execute on function private.is_team_member(bigint) from PUBLIC, anon, authenticated, service_role;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve helper execution privileges for roles using the policy

When this example is applied to an RLS-protected table queried as authenticated, revoking EXECUTE from both PUBLIC and authenticated prevents the subsequent policy from calling private.is_team_member, causing queries to fail with a function-permission error instead of filtering orders. SECURITY DEFINER changes privileges inside the function; it does not authorize callers to invoke it. PostgreSQL documents that policy expressions execute “with the privileges of the user running the query.” (Row Security Policies) Retain or explicitly grant EXECUTE for roles that use this policy, while keeping the helper schema outside the exposed API schemas.

Useful? React with 👍 / 👎.

```typescript
const cache = createCache({
ttl: 60,
storage: { type: 'memory' },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enable reference invalidation in the cache configuration

When this reference-based invalidation example is followed, cache.invalidateAll('user:123') leaves the cached entries untouched because memory storage disables invalidation by default. Consequently, updating a user and running the illustrated invalidation still serves the old data until the 60-second TTL expires. The library documentation explicitly requires enabling invalidation in storage settings, and its memory implementation returns without removing entries when that option is disabled. Set storage.options.invalidation: true in this example.

Useful? React with 👍 / 👎.


async function* toUpperCase(source: AsyncIterable<Buffer>): AsyncGenerator<string> {
for await (const chunk of source) {
yield chunk.toString().toUpperCase();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Decode UTF-8 across stream chunk boundaries

For UTF-8 input containing a multibyte character split across two file-stream chunks, decoding each Buffer separately replaces the partial character with replacement characters and silently corrupts the output. Running this transform with the bytes of café split inside é produces CAF�� rather than CAFÉ; the later CSV enrichment and line-parsing examples repeat the same decoding pattern. Configure the input streams with encoding: 'utf8' and consume strings, or retain a StringDecoder across chunks, so incomplete characters survive until the next chunk.

Useful? React with 👍 / 👎.

Comment on lines +70 to +71
// Fastify automatically handles graceful shutdown
// Just register your cleanup in onClose hooks

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Register a shutdown handler in the standalone Fastify example

When the illustrated application is started directly with Node and receives SIGTERM or SIGINT, Fastify does not automatically call app.close(): the process terminates without draining in-flight requests or running the database/cache cleanup hooks. The Fastify hook documentation states that onClose is triggered when fastify.close() is invoked. Automatic signal handling is supplied separately by fastify-cli, which explicitly registers closeWithGrace and calls fastify.close(), but this example does not use that CLI. Register an equivalent handler here rather than instructing consumers that the hooks alone provide graceful shutdown.

Useful? React with 👍 / 👎.

@edagher92-coder
edagher92-coder force-pushed the chore/sync-claude-defaults branch from e99bb74 to 057fc67 Compare November 2, 2026 07:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 057fc67755

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +153 to +154
await cache.invalidate('getUser', '123');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use clear to invalidate a cache entry by its key

In the manual-invalidation example, cache.invalidate('getUser', '123') does not remove the entry cached by cache.getUser('123'): invalidate interprets its second argument as a reference, not an entry key, and the illustrated getUser definition does not register references. Consumers following this pattern therefore continue serving the cached user after an update. Use cache.clear('getUser', '123') for key-based removal, as distinguished in the library implementation.

Useful? React with 👍 / 👎.

});

cache.define('getUserPosts', {
references: (args, key, result) => [`user:${args[0]}`],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Build the posts reference from the complete user ID

Even after enabling reference invalidation in storage, this callback registers posts under the wrong reference: the library passes the original argument directly to references, not an array of arguments (implementation). Thus cache.getUserPosts('123') registers user:1, and the illustrated invalidateAll('user:123') leaves those posts cached. Interpolate args itself so the user and posts entries share the same reference.

Useful? React with 👍 / 👎.

Comment on lines +42 to +45
Alternative: use a single statement to update atomically:

```sql
-- Single statement acquires all locks atomically

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve ordered locking in the single-statement alternative

When concurrent transactions touch overlapping accounts in different scan orders, this alternative can still deadlock: PostgreSQL acquires row locks as the UPDATE processes rows, not atomically for the entire statement, and WHERE id IN (1, 2) does not impose a locking order. For example, this statement can lock account 2 first while the preceding ordered-locking pattern holds account 1, leaving each transaction waiting for the other. Presenting it as a replacement for explicit ordered locking removes the protection this rule is meant to provide. Retain the ordered SELECT ... FOR UPDATE before the UPDATE; the PostgreSQL deadlock documentation requires consistent lock ordering or transaction retries.

Useful? React with 👍 / 👎.

pattern-sanitizers:
- pattern: strconv.Atoi($X)
- pattern: strconv.ParseInt($X, ...)
- pattern: filepath.Clean($X)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep filepath.Clean output tainted in the Go traversal rule

When this rule scans a handler that passes filepath.Clean(req.URL.Query().Get("path")) to os.ReadFile, the sanitizer declaration suppresses the traversal finding even though inputs such as ../../etc/passwd remain dangerous. filepath.Clean only normalizes a path lexically; it does not enforce containment or reject leading parent-directory components. Because Semgrep treats sanitizer matches as untainted, this creates a false negative in the path-traversal sinks explicitly included above. Remove filepath.Clean from the sanitizers and only suppress flows with a verified containment check.

Useful? React with 👍 / 👎.

@edagher92-coder
edagher92-coder force-pushed the chore/sync-claude-defaults branch from 057fc67 to 4487b04 Compare November 9, 2026 07:10
@edagher92-coder
edagher92-coder force-pushed the chore/sync-claude-defaults branch 2 times, most recently from 3584484 to dfcb77b Compare November 19, 2026 02:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dfcb77b80f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +29 to +32
-- Option 2: Deallocate after use in transaction mode
prepare get_user as select * from users where id = $1;
execute get_user(123);
deallocate get_user;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep preparation and execution in the same transaction

When these statements are executed separately in autocommit mode through a transaction pooler, the connection can be returned to the pool immediately after PREPARE, so EXECUTE can still reach a different backend and fail with “prepared statement does not exist.” Adding DEALLOCATE afterward does not prevent the failure demonstrated in the preceding incorrect example. PgBouncer documents that a server connection is assigned “only during a transaction.” Wrap the entire prepare/execute/deallocate sequence in an explicit transaction, or remove this option in favor of unnamed statements or session pooling.

Useful? React with 👍 / 👎.

Comment on lines +13 to +17
const focusableElements = modal.querySelectorAll(
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
);
const firstElement = focusableElements[0];
const lastElement = focusableElements[focusableElements.length - 1];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude non-tabbable controls from modal focus boundaries

When a custom modal ends with a disabled submit button, this selector still assigns that button to lastElement, even though keyboard focus cannot reach it. Pressing Tab from the last enabled control therefore misses the wraparound condition and moves focus outside the modal; Shift+Tab from the first control instead attempts to focus the disabled button and goes nowhere. This defeats the copy-paste pattern linked from the main accessibility skill and the W3C modal keyboard interaction requirements. Derive the boundaries from actually tabbable, enabled, visible elements, or use a native modal dialog.

Useful? React with 👍 / 👎.

@edagher92-coder
edagher92-coder force-pushed the chore/sync-claude-defaults branch from dfcb77b to 4f1c707 Compare November 19, 2026 02:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f1c7077ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +44 to +45
select 1 from pg_constraint
where conname = 'check_age_positive'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scope constraint-existence checks to the target table

If another table or schema already has a constraint named check_age_positive, this check silently skips adding the constraint to users, leaving invalid ages accepted while the migration reports success. The foreign-key example below has the same problem. PostgreSQL explicitly documents that conname is not necessarily unique. Include the target table's conrelid in both existence predicates, as the preceding unique-constraint example already does.

Useful? React with 👍 / 👎.

Comment on lines +338 to +340
log_text, log_error = fetch_run_log(run_id, repo_root)
if not log_error:
return log_text, "", "ok"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retrieve job-specific logs before falling back to the full run

When a completed workflow contains multiple failing jobs, fetch_check_log returns the entire run log for every check and ignores the extracted job_id. Since extract_failure_snippet selects the last failure marker, unrelated checks receive the same failure snippet; a mocked lint/build run reproduces the build error being reported for both checks. In this script, job-specific retrieval only happens when the full run is still pending. Prefer job-scoped logs whenever a job ID is available: the GitHub CLI documentation describes --job as “View a specific job ID from a run” and demonstrates gh run view --log --job 456789.

Useful? React with 👍 / 👎.

Comment on lines +34 to +35
-- work_mem * max_connections should not exceed 25% of RAM
alter system set work_mem = '8MB'; -- 8MB * 100 = 800MB max

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Account for per-operation memory when sizing work_mem

For concurrent queries containing multiple sorts or hash joins, the stated 800MB max is not a memory ceiling, so following this calculation can exhaust the example's 4GB server despite satisfying the proposed 25% rule. PostgreSQL allocates work_mem per query operation, applies an additional hash_mem_multiplier to hash tables, and gives parallel workers their own allowances, as explained in its resource-consumption documentation. Replace the claimed maximum with a workload-dependent estimate that accounts for concurrently active operations, hash memory, and parallel workers rather than treating each connection as one allocation.

Useful? React with 👍 / 👎.

@edagher92-coder
edagher92-coder force-pushed the chore/sync-claude-defaults branch from 4f1c707 to 87ee0c9 Compare November 21, 2026 10:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 87ee0c955d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +166 to +167
await server.close();
await db.end();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Await the HTTP server's close callback before closing the database

When this Kubernetes shutdown pattern is used with the node:http server demonstrated above and a request is still running after the five-second pause, await server.close() does not wait for that request: close() returns the server, not a promise. Consequently, db.end() runs while handlers may still need the database, and the shutdown callback can finish before responses drain. A local reproduction produced db.end called before request finished and server closed. Wrap the close callback in a promise, as the earlier HTTP shutdown example already does, before releasing dependent resources.

Useful? React with 👍 / 👎.

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