commits
Change isLoggedIn from eager evaluation at module load time to lazy
initialization. Authentication now only starts when isLoggedIn is
first awaited, preventing race conditions during test setup or when
the module is imported before the application is ready.
The implementation uses a thenable object for backward compatibility,
allowing existing `await isLoggedIn` patterns to continue working.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Convert void-discarded promises to properly awaited calls with error
handling and aggregation. This prevents phantom state where Redis
succeeds but Ozone API fails.
Changes:
- Add ModerationResult type for structured error tracking
- Add moderationActionsFailedCounter metric for monitoring failures
- Modify moderation functions to rethrow errors after logging
- Update checkProfiles.ts ProfileChecker with async/await pattern
- Update checkPosts.ts to use for...of loop with proper awaiting
- Update countStarterPacks.ts with error handling
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add docs/common/starterPackThreshold.md for new module
- Update types.md with WindowUnit, StarterPackThresholdConfig
- Update redis.md with starter pack tracking functions and fixed signatures
- Update metrics.md with 3 new starter pack threshold metrics
- Update accountThreshold.md with corrected function signature (uri param)
- Update accountModeration.md with error handling clarification
- Update main.md with starter pack handler section
- Update developing_checks.md with starter pack threshold section
- Fix accountThreshold config examples (windowDays → window + windowUnit)
- Update README.md with complete env vars and threshold system docs
- Improve rule file examples with comprehensive optional field coverage
- Add proper LINK_SHORTENER pattern to constants.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat: Add retry logic to authentication
The authentication flow was updated to include retry logic. This ensures
that the application attempts to log in multiple times if the initial
attempts fail. This also addresses an issue where the app was exiting
before the Jetstream client was started.
Prom integration
Update dependencies to address security vulnerabilities and improve
overall project health. This includes updates for eslint,
eslint-plugin-import, and others.
Update dependencies to address security vulnerabilities and improve
overall project health. This includes updates for eslint,
eslint-plugin-import, and others.
Move the `LINK_SHORTENER` constant from `rules/posts.ts` to
`rules/constants.ts` and remove the now duplicate declaration.
Move the `LINK_SHORTENER` constant from `rules/posts.ts` to
`rules/constants.ts` and remove the now duplicate declaration.
This constant will hold a list of allowed link shorteners.
This constant will hold a list of allowed link shorteners.
Adds example configuration files for account age, account threshold,
global allowlist, handle checks, post checks, and profile checks. These
files contain example values and instructions for configuration.
Adds example configuration files for account age, account threshold,
global allowlist, handle checks, post checks, and profile checks. These
files contain example values and instructions for configuration.
The example config files are no longer needed. The CI setup previously
copied the example files to the main config files. This is no longer
necessary, as the user will be expected to create the config files from
scratch.
The example config files are no longer needed. The CI setup previously
copied the example files to the main config files. This is no longer
necessary, as the user will be expected to create the config files from
scratch.
- Added example configuration files for account age, account threshold,
global constants, handles, posts, and profiles. - Updated the CI build
to copy the example configuration files. - Removed the now redundant
rules/README.md. - Updated .gitignore to exclude all rules.
- Added example configuration files for account age, account threshold,
global constants, handles, posts, and profiles. - Updated the CI build
to copy the example configuration files. - Removed the now redundant
rules/README.md. - Updated .gitignore to exclude all rules.
Rate limit improvements
Rate limit improvements
- Stores and restores session for persistent login - Implements dynamic
rate limiting from ATP headers - Adds Prometheus metrics for rate limit
state and waits - Refactors authentication flow for session persistence
- Stores and restores session for persistent login - Implements dynamic
rate limiting from ATP headers - Adds Prometheus metrics for rate limit
state and waits - Refactors authentication flow for session persistence
This commit introduces Redis caching to prevent redundant moderation
actions, reducing the load on the Bluesky API.
- Added the `redis` package as a dependency. - Implemented
`connectRedis` and `disconnectRedis` functions to manage the Redis
connection. - Added `tryClaimPostLabel`, `tryClaimAccountLabel`, and
`tryClaimAccountComment` functions to manage and claim resources for
caching purposes. - Modified `src/config.ts` to include the `REDIS_URL`
environment variable. - Added `src/redis.ts` which contains the Redis
client and connection management. - Integrated the caching logic into
moderation functions to ensure that actions are performed only once per
resource. - Added Redis healthcheck to compose.yaml. - Updated
package.json and bun.lock.
This commit introduces Redis caching to prevent redundant moderation
actions, reducing the load on the Bluesky API.
- Added the `redis` package as a dependency. - Implemented
`connectRedis` and `disconnectRedis` functions to manage the Redis
connection. - Added `tryClaimPostLabel`, `tryClaimAccountLabel`, and
`tryClaimAccountComment` functions to manage and claim resources for
caching purposes. - Modified `src/config.ts` to include the `REDIS_URL`
environment variable. - Added `src/redis.ts` which contains the Redis
client and connection management. - Integrated the caching logic into
moderation functions to ensure that actions are performed only once per
resource. - Added Redis healthcheck to compose.yaml. - Updated
package.json and bun.lock.
feat: Add Redis caching and connection
feat: Add Redis caching and connection
This commit introduces Redis caching to prevent redundant moderation
actions, reducing the load on the Bluesky API.
- Added the `redis` package as a dependency. - Implemented
`connectRedis` and `disconnectRedis` functions to manage the Redis
connection. - Added `tryClaimPostLabel`, `tryClaimAccountLabel`, and
`tryClaimAccountComment` functions to manage and claim resources for
caching purposes. - Modified `src/config.ts` to include the `REDIS_URL`
environment variable. - Added `src/redis.ts` which contains the Redis
client and connection management. - Integrated the caching logic into
moderation functions to ensure that actions are performed only once per
resource. - Added Redis healthcheck to compose.yaml. - Updated
package.json and bun.lock.
This commit introduces Redis caching to prevent redundant moderation
actions, reducing the load on the Bluesky API.
- Added the `redis` package as a dependency. - Implemented
`connectRedis` and `disconnectRedis` functions to manage the Redis
connection. - Added `tryClaimPostLabel`, `tryClaimAccountLabel`, and
`tryClaimAccountComment` functions to manage and claim resources for
caching purposes. - Modified `src/config.ts` to include the `REDIS_URL`
environment variable. - Added `src/redis.ts` which contains the Redis
client and connection management. - Integrated the caching logic into
moderation functions to ensure that actions are performed only once per
resource. - Added Redis healthcheck to compose.yaml. - Updated
package.json and bun.lock.
This commit upgrades project dependencies, including: - @types/node to
v22.18.0 - @vitest/coverage-v8 to v1.6.0 - Other dependencies for bug
fixes and improvements
This commit upgrades project dependencies, including: - @types/node to
v22.18.0 - @vitest/coverage-v8 to v1.6.0 - Other dependencies for bug
fixes and improvements
Provides examples of checks for spam and promotional content, including
regular expressions and actions to take when matches are found.
Provides examples of checks for spam and promotional content, including
regular expressions and actions to take when matches are found.
Use Bun to run the type check, tests, and coverage.
Use Bun to run the type check, tests, and coverage.
Change isLoggedIn from eager evaluation at module load time to lazy
initialization. Authentication now only starts when isLoggedIn is
first awaited, preventing race conditions during test setup or when
the module is imported before the application is ready.
The implementation uses a thenable object for backward compatibility,
allowing existing `await isLoggedIn` patterns to continue working.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Convert void-discarded promises to properly awaited calls with error
handling and aggregation. This prevents phantom state where Redis
succeeds but Ozone API fails.
Changes:
- Add ModerationResult type for structured error tracking
- Add moderationActionsFailedCounter metric for monitoring failures
- Modify moderation functions to rethrow errors after logging
- Update checkProfiles.ts ProfileChecker with async/await pattern
- Update checkPosts.ts to use for...of loop with proper awaiting
- Update countStarterPacks.ts with error handling
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add docs/common/starterPackThreshold.md for new module
- Update types.md with WindowUnit, StarterPackThresholdConfig
- Update redis.md with starter pack tracking functions and fixed signatures
- Update metrics.md with 3 new starter pack threshold metrics
- Update accountThreshold.md with corrected function signature (uri param)
- Update accountModeration.md with error handling clarification
- Update main.md with starter pack handler section
- Update developing_checks.md with starter pack threshold section
- Fix accountThreshold config examples (windowDays → window + windowUnit)
- Update README.md with complete env vars and threshold system docs
- Improve rule file examples with comprehensive optional field coverage
- Add proper LINK_SHORTENER pattern to constants.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Prom integration
Update dependencies to address security vulnerabilities and improve
overall project health. This includes updates for eslint,
eslint-plugin-import, and others.
This commit introduces Redis caching to prevent redundant moderation
actions, reducing the load on the Bluesky API.
- Added the `redis` package as a dependency. - Implemented
`connectRedis` and `disconnectRedis` functions to manage the Redis
connection. - Added `tryClaimPostLabel`, `tryClaimAccountLabel`, and
`tryClaimAccountComment` functions to manage and claim resources for
caching purposes. - Modified `src/config.ts` to include the `REDIS_URL`
environment variable. - Added `src/redis.ts` which contains the Redis
client and connection management. - Integrated the caching logic into
moderation functions to ensure that actions are performed only once per
resource. - Added Redis healthcheck to compose.yaml. - Updated
package.json and bun.lock.
This commit introduces Redis caching to prevent redundant moderation
actions, reducing the load on the Bluesky API.
- Added the `redis` package as a dependency. - Implemented
`connectRedis` and `disconnectRedis` functions to manage the Redis
connection. - Added `tryClaimPostLabel`, `tryClaimAccountLabel`, and
`tryClaimAccountComment` functions to manage and claim resources for
caching purposes. - Modified `src/config.ts` to include the `REDIS_URL`
environment variable. - Added `src/redis.ts` which contains the Redis
client and connection management. - Integrated the caching logic into
moderation functions to ensure that actions are performed only once per
resource. - Added Redis healthcheck to compose.yaml. - Updated
package.json and bun.lock.
This commit introduces Redis caching to prevent redundant moderation
actions, reducing the load on the Bluesky API.
- Added the `redis` package as a dependency. - Implemented
`connectRedis` and `disconnectRedis` functions to manage the Redis
connection. - Added `tryClaimPostLabel`, `tryClaimAccountLabel`, and
`tryClaimAccountComment` functions to manage and claim resources for
caching purposes. - Modified `src/config.ts` to include the `REDIS_URL`
environment variable. - Added `src/redis.ts` which contains the Redis
client and connection management. - Integrated the caching logic into
moderation functions to ensure that actions are performed only once per
resource. - Added Redis healthcheck to compose.yaml. - Updated
package.json and bun.lock.
This commit introduces Redis caching to prevent redundant moderation
actions, reducing the load on the Bluesky API.
- Added the `redis` package as a dependency. - Implemented
`connectRedis` and `disconnectRedis` functions to manage the Redis
connection. - Added `tryClaimPostLabel`, `tryClaimAccountLabel`, and
`tryClaimAccountComment` functions to manage and claim resources for
caching purposes. - Modified `src/config.ts` to include the `REDIS_URL`
environment variable. - Added `src/redis.ts` which contains the Redis
client and connection management. - Integrated the caching logic into
moderation functions to ensure that actions are performed only once per
resource. - Added Redis healthcheck to compose.yaml. - Updated
package.json and bun.lock.