Claude Code reads CLAUDE.md, so keep a thin stub that pulls in AGENTS.md
via @import. Claude-only notes can go below the import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AGENTS.md is the instruction file read by most coding agents (Codex,
Gemini CLI, Cursor, Copilot, etc.), so the guidance now applies to all of
them rather than Claude Code only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The personal access token expired, causing the v0.3.0 release job to
fail at the homebrew tap checkout step. Switch to a GitHub App
(actions/create-github-app-token) which auto-rotates tokens per run
and has no expiry to manage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Surface retryCount and retryAt fields in the human table format for
barn status, so retrying jobs are distinguishable from freshly queued
jobs. Also add retryAt to the single job detail view.
- Add RETRIES and NEXT RETRY columns to StatusCommand and HumanFormatter
- Add retryAt display to HumanFormatter single job detail
- Update README and testing-manual docs with new columns
- Add tests for retry display in StatusCommand, HumanFormatter, and XmlFormatter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add [load] section to `barn config show` output displaying max_high_jobs,
max_medium_jobs, and max_low_jobs
- Fix bug where BARN_LOADLEVELS_* environment variables were ignored if
config file had a [load_levels] section
- Bump version to 0.2.1
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements #34 - Job Limits Per Load Level
Jobs are now classified into HIGH, MEDIUM, or LOW load levels based on
gitignore-style whitelist files (.load files). This allows concurrent
execution of different types of jobs (e.g., downloading while transcoding).
Changes:
- Add LoadLevel enum with default limits (HIGH=2, MEDIUM=8, LOW=32)
- Add LoadLevelConfig record for per-level max jobs configuration
- Add CommandMatcher sealed interface for matching commands by name/path/dir
- Add LoadFileParser for parsing .load whitelist files
- Add LoadLevelClassifier for auto-classifying commands
- Add ConfigInstallCommand (barn config install) for default config files
- Update JobScheduler to use per-level limits with EnumMap
- Add --load-level/-l option to barn run for manual override
- Add load level display to barn status and barn describe output
- Remove --user flag from service install/uninstall (system-wide only)
- Update documentation for load levels and whitelist files
Default whitelists:
- high.load: ffmpeg, ffprobe, handbrake, x264, x265, etc.
- low.load: curl, wget, rclone, rsync, aria2c, etc.
- medium.load: empty (unmatched commands default to MEDIUM)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Shows full JSON output for running, succeeded, and failed states.
All examples now include logs for complete programmatic workflow.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove shell-specific commands (tail, watch, grep) in favor of
barn describe --logs for cross-platform compatibility.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Shows complete process: submit job, poll status, get progress,
handle completion. Includes example bash script.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Machine-readable progress output to stdout makes parsing easier
and follows the pattern users expect.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Explains FFmpeg's stdout/stderr behavior (progress goes to stderr by design),
exit codes, recommended flags, and monitoring patterns.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Job, JobManifest, and JobState to reflect-config.json for
proper Jackson serialization in native image.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add VersionProvider class that reads version from version.properties
- Enable Maven resource filtering for version.properties
- Version is now automatically synced with pom.xml
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
GITHUB_TOKEN events don't trigger other workflows, so the separate
update-homebrew workflow never ran. Move the logic directly into
the release workflow.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove macos-x64 reference (not built)
- Add linux-arm64 and linux-x64 support
- Use environment variables in heredoc for proper interpolation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace SLF4J/logback with custom BarnLogger across all source files
- BarnLogger is disabled by default for CLI commands, enabled for service
- Fixes#30: debug logs no longer break JSON/XML CLI output
- Add SpotBugs exclusions for BarnLogger false positives
- Update docs: remove .deb and AUR references (no longer applicable)
- Update docs: add Windows setup.exe installation instructions
- Update docs: clarify auto-update only works with Homebrew
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The jacoco:check goal requires rules configuration which is only
available in the verify execution. Coverage is already checked
in the verify job via `mvn verify`.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Set root log level to OFF by default in logback.xml
- Service startup explicitly enables logging via LoggingConfig
- Use cross-platform path ${java.io.tmpdir} for log directory
- Remove unused CONSOLE appender
This prevents debug logs from breaking JSON/XML output in CLI commands.
Fixes#30
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Test code has different style requirements than production code.
Excluding tests allows focus on production code quality.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Allow underscores in JUnit 5 test method names (junit5TestPattern)
- Exclude LocalVariableCouldBeFinal (style preference, not a bug)
- Exclude MethodArgumentCouldBeFinal (style preference)
- Exclude LinguisticNaming (getter-like test names are fine)
- Exclude UseUnderscoresInNumericLiterals (12345L is readable)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code fixes:
- Add Locale.ROOT to all toLowerCase()/toUpperCase() calls (DM_CONVERT_CASE)
- Remove unused variable in ServiceReloadCommand (DLS_DEAD_LOCAL_STORE)
- Combine duplicate switch cases in ConfigShowCommand, ServiceStatusCommand
SpotBugs exclusions (false positives only):
- COMMAND_INJECTION: CLI commands use hardcoded paths, not user input
- CRLF_INJECTION_LOGS: We log internal identifiers like job IDs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reverting the broad exclusions added in the previous commits.
Will fix actual code issues instead of suppressing warnings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Allow underscores in JUnit 5 test method names (BDD style)
- Exclude LinguisticNaming (getter-like test names are fine)
- Exclude LocalVariableCouldBeFinal (var is readable in tests)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Exclude the following false positive patterns:
- CRLF_INJECTION_LOGS: Log values are internal, not user-controlled
- COMMAND_INJECTION: Platform service managers need to run commands
- VA_FORMAT_STRING_USES_NEWLINE: Config file generators need \n
- DM_CONVERT_CASE: Internal identifiers don't need locale
- IMPROPER_UNICODE: Simple parsing doesn't need Unicode handling
- EI_EXPOSE_REP: BarnService intentionally exposes components
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add examples showing JSON output format for:
- barn service status
- barn run
- barn status
- barn describe
Also fixed typos in command examples and removed duplicate sections.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add install.sh for Linux/macOS (curl installer)
- Detects OS and architecture
- Sets up systemd service on Linux
- Sets up launchd agent on macOS
- Auto-starts service on boot
- Add install.ps1 for Windows (PowerShell installer)
- Installs Windows Service (admin) or Scheduled Task (user)
- Adds to PATH automatically
- Add installer/barn.iss (Inno Setup script)
- Generates setup-barn-vX.X.X-windows-x64.exe
- Full Windows installer with uninstaller
- Update release workflow to include installers
- Update README with quick install instructions
Closes#26, #27, #29
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When the barn service is terminated unexpectedly (crash, SIGKILL), jobs
that were running are now marked as KILLED instead of FAILED. This
distinguishes between jobs that failed due to their own errors vs jobs
that were killed due to external factors.
Key changes:
- Add KILLED state to JobState enum
- Update JobStateMachine with KILLED transitions (RUNNING→KILLED, KILLED→QUEUED)
- CrashRecovery now marks orphaned jobs as KILLED and auto-retries them
- Add markKilled() method to JobRepository
- Add killed count to service status output
- Update HumanFormatter to display KILLED state in red
The auto-retry behavior uses exponential backoff (configurable) and
respects the maxRetries limit. Retry history is recorded in the
retry_history file.
Closes#25
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Windows 10 1803+ supports Unix domain sockets but requires a regular
file path, not the named pipe format (\\.\pipe\...). Changed the
Windows IPC socket default from named pipe to file path in %TEMP%.
This fixes "Network is down: bind" error when starting the service
on Windows.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added mandatory checklist for testing ALL subcommands with the native
binary before creating any release tag. Includes:
- Prerequisites for building native image
- Tests for all basic commands (help, version)
- Tests for all service commands (start, stop, restart, reload, status, logs)
- Tests for all job commands (run, status, describe, usage, kill, clean)
- Tests for config and autocompletion commands
- Copyable checklist summary
This ensures we never release a broken native binary again.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
In GraalVM native images, java.home and java.class.path are null.
When starting the daemon process, detect if running as native image
using org.graalvm.nativeimage.imagecode property. If so, re-exec the
current executable instead of trying to spawn a JVM.
Fixes NullPointerException on Windows when running `barn service start`.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Windows binary was crashing with STATUS_ILLEGAL_INSTRUCTION on x64
emulated environments (like Parallels on ARM Macs). GraalVM native-image
by default uses CPU features detected at build time.
Adding -march=compatibility ensures the binary uses only baseline
x86-64 instructions that work across all x64 CPUs and emulators.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Jackson deserialization in native binary fails when processing job
status responses. Added missing classes to reflect-config.json:
- Job, JobManifest, JobState, ResourceUsage
- Config, ServiceConfig, StorageConfig, JobsConfig, CleanupConfig
- Collection types for IPC payloads
Tested locally with native binary:
- barn run, status, describe, usage, kill, clean
- barn service status, config show, autocompletion
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
IPC communication was failing in native binary because Jackson
couldn't deserialize IpcMessage and related classes without
reflection configuration.
Added reflect-config.json with all IPC classes.
Bumped version to 0.1.2.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed hardcoded version checks to regex pattern matching
so tests don't break on version bumps.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>