Guidance for AI coding agents (and human contributors) working in this repository.
s3sdk is a ColdBox module and standalone library providing Amazon S3 connectivity for ColdBox, BoxLang and CFML applications. It also works with any S3-compatible endpoint (DigitalOcean Spaces, Google Cloud Storage, MinIO).
models/AmazonS3.cfc: the main SDK entry point, all public bucket/object operationsmodels/Sv4Util.cfc: AWS Signature Version 4 request signing (default)models/Sv2Util.cfc: AWS Signature Version 2 request signing (legacy)models/MiniLogBox.cfc: lightweight logger used when the module runs standalone, outside of LogBoxModuleConfig.cfc: ColdBox module registrationtest-harness/: a full ColdBox test application used to run the TestBox test suite
This repository has a large collection of BoxLang, ColdBox, CommandBox, DocBox and TestBox skills in .agents/skills/. The skills directory is ignored from version control, while skills-lock.json records the installed skill sources. After a fresh checkout, restore the local skills with:
npx skills experimental_installWhen working on a task, inspect and follow the relevant skill before changing code. Do not assume that an absent .agents/skills/ directory means the repository has no applicable guidance.
Use this quick guide to choose a starting point:
- BoxLang syntax and code:
boxlang-language-fundamentals,boxlang-best-practices,boxlang-classes-and-oop, orboxlang-functional-programming - BoxLang runtime features: the matching
boxlang-*skill for applications, configuration, caching, files, async work, schedulers, watchers, Java integration, or web development - ColdBox, CommandBox, and modules: the matching
commandbox-*orboxlang-core-dev-*skill for module development, interceptors, logging, components, BIFs, and runtime internals - Testing:
boxlang-testing,commandbox-testing, orbx-web-supportfor web-context tests - Documentation:
boxlang-code-documenter,boxlang-docbox, orbx-docbox - Deployment and operations:
boxlang-deployment, the relevantboxlang-runtime-*skill, orcommandbox-deploying - Security:
boxlang-security,bx-esapi,bx-csrf, orbx-password-encrypt
Prefer the most specific skill, and consult more than one when a task crosses domains.
CI (.github/workflows/tests.yml) runs the test suite against:
- BoxLang 1+, native (
server-boxlang@1.json) - BoxLang 1+, CFML compatibility mode (
server-boxlang-cfml@1.json) - Lucee 6+ (
server-lucee@6.json) - Adobe ColdFusion 2023 and 2025 (
server-adobe@2023.json,server-adobe@2025.json)
Each engine has real, meaningful differences an agent must account for when changing code:
argumentsscope andisNull(): for an optional, no-default argument that was not passed, Lucee/Adobe omit the key entirely fromarguments(sostructKeyExists( arguments, "x" )returnsfalse), while BoxLang keeps the key present with anullvalue (sostructKeyExists()returnstrueeven though nothing was passed). Always check optional arguments independently withisNull( arguments.x ), never withstructKeyExists( arguments, "x" ).dateFormat()masks are case-sensitive : useMMfor month andmmonly for minutes (intimeFormat()). Do not useyyyymmdd, useyyyyMMdd.- CFHTTP header duplication : do not manually set a header that an engine's own
cfhttptag will also compute automatically (e.g.Content-Lengthon a bodyless request). Some engines do not de-duplicate this and will send both values comma-joined on the wire, which breaks AWS's request signature validation withSignatureDoesNotMatch.
This SDK makes real HTTP calls against live AWS S3 (via S3SDK_AWS_ACCESS_KEY / S3SDK_AWS_ACCESS_SECRET secrets in CI) — there is no local S3 mock in this repo's test suite. Keep that in mind when diagnosing CI failures: a failure is either a real bug in the request/signing code, a transient AWS/network issue, or a test environment problem, not a mock configuration issue.
To run tests locally:
box install
cd test-harness && box install && cd ..
box server start serverConfigFile="server-boxlang@1.json"
box testbox runSet AWS_ACCESS_KEY / AWS_ACCESS_SECRET (or a .env file) with valid AWS credentials before running tests locally, since they exercise real S3 calls.
This project uses commandbox-cfformat. Always run before committing:
box run-script format:check
# or, to auto-fix:
box run-script formatCI will fail if code is not correctly formatted — do not guess at formatting, run the actual tool.
- Prefer fixes that work identically across all supported engines over engine-specific branches.
- When fixing a signature/signing bug, verify against AWS's own echoed-back
CanonicalRequest/StringToSignin theSignatureDoesNotMatcherror response — it shows exactly what AWS reconstructed server-side, which is the fastest way to spot a header or encoding mismatch. - Update
changelog.mdfor any user-facing fix or change, following the existingKeep a Changelogformat. - Do not add a CFML engine to the CI matrix without also adding its
server-*.jsonconfig file.