In 2026, Erlang developers use Atlas to review pull requests by leveraging its deep understanding of Erlang/OTP systems, integrating directly with `rebar3`, `rebar3 eunit`, and `erlfmt`. Atlas fetches the branch, reads full files for context, checks for breaking changes in supervision trees, and runs tests, ensuring a thorough review beyond simple line-by-line diffs.
How Atlas Fetches and Diffs Erlang Pull Request Branches
Atlas streamlines the initial phase of an Erlang pull request review by fetching the specific branch and generating a comprehensive diff, much like a human developer would in 2026. This process ensures that all changes, including those to `rebar.config` or `src/*.app.src` files, are accurately captured.
When an Erlang developer initiates a pull request review, Atlas first uses its internal VCS layer to interact with the underlying Git repository. This layer exposes `status`, `diff`, `diffRaw`, and `commits` operations, allowing Atlas to precisely fetch the target branch and produce a unified diff. For an Erlang project, this means Atlas can identify changes across all `.erl` source files, `.hrl` header files, and critical configuration files like `rebar.config` or `sys.config`. The `bash` tool within Atlas is employed to execute the necessary Git commands, ensuring that the raw patch is available for subsequent analysis. This initial step is crucial for establishing a complete and accurate baseline of modifications before any deeper code analysis begins, mirroring the meticulous approach of an experienced Erlang engineer.
Reading Full Erlang Files for Context Beyond the Diff
A key advantage of using Atlas for Erlang pull request reviews is its ability to read entire files, not just the diff hunks, providing crucial context in 2026. This capability is vital for understanding how changes to a `gen_server` module or a `supervisor` callback might impact surrounding code that the diff itself does not highlight.
Unlike a simple line-by-line diff, which only shows modified sections, Atlas employs its `read` tool to pull the full content of changed Erlang files. This is particularly important in Erlang/OTP systems where a small change in a `handle_call` clause within a `gen_server` module might have implications for other functions in the same module, or even for related modules in the supervision tree, that are not directly touched by the diff. By accessing the complete file, Atlas can analyze the broader context, such as module attributes, record definitions in `.hrl` files, or the structure of a `supervisor`'s `init/1` function. This holistic view helps catch bugs that arise from incomplete understanding of the surrounding code, a common pitfall in traditional code reviews.
Checking Erlang Function Signature Changes with LSP
Atlas leverages the `lsp` tool's `findReferences` operation to meticulously check for breaking changes in Erlang function signatures, a critical step in 2026. This ensures that modifications to a `gen_server:start_link/3` or a `supervisor:start_child/2` do not inadvertently break callers not visible in the immediate diff.
In Erlang, where hot code loading and supervision trees are fundamental, a change to a function's arity or return type can have cascading effects across an application. Atlas addresses this by using the `lsp` tool's `findReferences` operation for every changed function signature. For instance, if a developer modifies a `handle_call` clause in a `gen_server` module, Atlas will query the LSP server to identify all call sites of that function. This allows Atlas to detect if a change to `my_module:my_function/2` now requires updates in `another_module.erl` that were not part of the original pull request diff. This proactive check is essential for maintaining the integrity of Erlang/OTP systems, preventing runtime errors that might only manifest during deployment or hot code upgrades.
Grepping for Untouched Erlang Patterns and Stale Code
Atlas employs its `grep` tool to identify patterns that should have been updated in an Erlang codebase but were overlooked, a common issue in 2026. This includes searching for old constant names defined in `.hrl` files or stale copies of modules that might exist in different directories.
Beyond explicit diffs, Erlang projects often contain implicit dependencies or duplicated code that can lead to bugs if not updated consistently. Atlas uses `grep` to search for specific patterns that a change should have addressed. For example, if a constant defined in `my_app.hrl` was renamed, Atlas can `grep` for the old constant name across the entire codebase to ensure all references are updated. Similarly, if a feature flag in `sys.config` was modified, Atlas can verify its usage. This also extends to finding stale copies of modules or configuration snippets that might reside in `priv/` or other non-standard locations, ensuring that the Erlang application remains consistent and free of hidden inconsistencies. This systematic search helps catch subtle bugs that a human reviewer might easily miss.
Running Erlang Tests with `rebar3 eunit` and `rebar3 ct`
Atlas integrates directly with the Erlang toolchain to run tests, specifically `rebar3 eunit` and `rebar3 ct`, reporting findings as a `todowrite` list in 2026. This ensures that all changes in a pull request, from a new `gen_server` to a modified `supervisor`, are validated against the existing test suites.
After analyzing the code, Atlas uses its `bash` tool to execute the project's Erlang tests. For unit tests, it runs `rebar3 eunit`, which executes tests defined in `src/*_SUITE.erl` files. For more comprehensive integration or system tests, Atlas can run `rebar3 ct` for Common Test suites located under the `test/` directory. Atlas captures the output of these commands and processes any failures or warnings. These findings are then reported back to the developer as a `todowrite` list, ordered by severity. This automated testing step is critical for Erlang/OTP systems, where the correctness of concurrent processes and supervision logic is paramount. Atlas ensures that even if a human reviewer overlooks a potential regression, the automated tests provide a safety net, preventing broken code from being merged.
Atlas Safety and Permissions for Erlang Codebases
Atlas prioritizes safety in Erlang pull request reviews through permission-gated tool calls and a read-only planning agent, a crucial feature in 2026. Every action, from running `rebar3 eunit` to modifying a `rebar.config`, requires explicit user approval, ensuring control remains with the Erlang developer.
Atlas is designed with multiple layers of safety to protect Erlang codebases. Every Atlas tool call, whether it's `bash` executing `rebar3 compile` or `lsp` querying for references, is permission-gated against `allow`, `ask`, and `deny` rules. Before any modifications are made, Atlas drafts a plan in a read-only plan agent and asks for user approval. Only after approval does it switch to a build agent. Furthermore, for every file edit, Atlas computes a unified diff and surfaces it for approval before writing to disk. This means an Erlang developer will always see and approve changes to `src/*.erl` files, `rebar.config`, or `sys.config` before they are committed. Atlas also snapshots file changes as Git patches, allowing edits to be diffed and rolled back, providing a robust safety net for critical Erlang/OTP systems.
Step by step
- 01Fetch the Erlang pull request branch and generate the diff using Atlas's VCS layer and `bash`.
- 02Use Atlas's `read` tool to pull the full content of all changed Erlang files (e.g., `src/my_module.erl`, `include/my_header.hrl`) for complete context.
- 03For every changed Erlang function signature (e.g., `gen_server:handle_call/3`), run Atlas's `lsp` tool with `findReferences` to check for unaddressed callers.
- 04Employ Atlas's `grep` tool to search the Erlang codebase for old constant names, feature flags, or stale code patterns that should have been updated (e.g., in `rebar.config` or `sys.config`).
- 05Execute Erlang unit tests by running `bash` with `rebar3 eunit` and Common Test suites with `rebar3 ct` via Atlas, capturing all output.
- 06Review the test findings and other analysis results, which Atlas presents as a `todowrite` list, ordered by severity.
- 07Approve or modify any proposed code changes from Atlas, reviewing the unified diff for Erlang files before writing or committing.
Frequently asked questions
- How does Atlas handle Erlang's hot code loading during a PR review?
- Atlas's `lsp` tool, specifically `findReferences`, helps identify potential issues with function signature changes that could impact hot code loading. By checking all call sites, Atlas ensures that modifications to an Erlang module's API are compatible with existing callers, preventing runtime errors during upgrades.
- Can Atlas run specific Erlang Common Test suites or just all tests?
- Yes, Atlas uses the `bash` tool to execute `rebar3 ct`, allowing it to run specific Common Test suites or all tests as configured in your `rebar.config`. This flexibility ensures targeted testing during an Erlang pull request review.
- Does Atlas understand Erlang supervision trees and `gen_server` modules?
- Atlas is designed to map Erlang's supervisor callbacks and `gen_server` modules. Its ability to read full files and use `lsp` for reference checking provides a deep understanding of how changes impact the structure and behavior of your Erlang/OTP application's supervision tree.
- How does Atlas ensure Erlang code style consistency with `erlfmt`?
- Atlas can be configured to run `erlfmt` on touched Erlang modules as part of its workflow. Before committing, Atlas can propose running `erlfmt` via its `bash` tool, ensuring that the diff matches the project's established style guidelines and maintaining consistency.
- What Erlang project files does Atlas pay special attention to?
- Atlas pays special attention to `rebar.config`, `src/*.app.src`, `.erl` source files, `.hrl` header files, and release configuration in `relx`. It understands their significance in an Erlang/OTP system and incorporates them into its analysis and review process.
- Is it safe to let Atlas modify my Erlang codebase?
- Yes, Atlas is designed with multiple safety mechanisms. It drafts plans in a read-only agent, asks for explicit user approval before executing any commands (like `rebar3 eunit` or `erlfmt`), and surfaces a unified diff for every proposed file edit before writing. You always have the final say over changes to your Erlang code.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Review a Pull Request with Atlas (2026 Workflow)
How to review a pull request with Atlas in 2026: bash produces the raw patch, read pulls whole files, the lsp tool's findReferences checks callers the diff never shows.
Atlas for Erlang in 2026
Atlas is a terminal-native AI coding agent for Erlang/OTP in 2026. Run it in an app with a rebar.config, map supervisors and gen_server modules, review every diff.
Upgrade a Dependency and Fix Breakage in Erlang with Atlas in 2026
In 2026, Erlang developers use Atlas to upgrade dependencies like `rebar3` packages, automatically fixing compile and test failures. Atlas leverages `rebar3 eunit` and `erlfmt` for a streamlined workflow.
Automate GitHub Issue and Pull Request Triage in Erlang with Atlas in 2026
Automate GitHub issue and pull request triage for Erlang projects using Atlas. Integrate with rebar3 and erlfmt, ensuring safe, permission-gated responses from trusted users in your CI/CD pipeline.
Run Atlas Headless in CI in Erlang with Atlas in 2026
Automate Erlang development in CI/CD with Atlas. Run Atlas headless, integrate with rebar3 and erlfmt, and get machine-readable output for Erlang/OTP projects in 2026.
Write Unit Tests for Untested Code in Erlang with Atlas in 2026
In 2026, Erlang developers use Atlas to write unit tests for untested modules, leveraging `rebar3 eunit` and `erlfmt` to match existing project conventions and ensure code quality.
Onboard to an unfamiliar codebase in Erlang with Atlas in 2026
Erlang developers in 2026 can use Atlas to quickly build a mental model of unfamiliar rebar3 projects. Understand supervision trees, gen_server modules, and application structure without reading every file, leveraging
Locate Erlang Behavior Implementations with Atlas in 2026
In 2026, Erlang developers use Atlas to quickly find where a behavior is implemented, leveraging semantic search, grep, and LSP tools across rebar3 projects.