Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ on:
tags: ['*']
pull_request:
workflow_dispatch:
inputs:
keep-test-image:
description: "Keep the Test Image (set to 'true' to keep the image)"
required: true
default: "false"
test-image-tag-suffix:
description: "Suffix for Test Image Tag"
required: false
default: ""

env:
REGISTRY: ghcr.io
Expand All @@ -24,7 +33,7 @@ jobs:

env:
NARG: 2
TAG: gha-test
TAG: "gha-test${{ github.event.inputs.test-image-tag-suffix }}"
INT_TAG: gha-int-test

# This job runs for all events that trigger this workflow
Expand All @@ -50,12 +59,21 @@ jobs:
with:
driver: docker

- name: Login to GHCR
# This condition should match the `push` condition in the `Build` step just below
if: ${{ github.event.inputs.keep-test-image == 'true' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build
id: build
uses: docker/build-push-action@v5
with:
context: .
push: false
push: ${{ github.event.inputs.keep-test-image == 'true' }}
load: true
build-args: |
img_user=${{ env.BASE_IMAGE_USER }}
Expand Down
110 changes: 110 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# AGENTS.md

## Purpose

This file defines guidance for coding agents acting as C++ developers in this repository.
The goal is to make safe, minimal, style-consistent changes to dripline-cpp.

## Repository Scope

- Main library code: `library/`
- CLI executables: `executables/` (`dl-agent`, `dl-mon`)
- Example services/endpoints: `examples/`
- Unit/integration tests: `testing/`
- Docs sources: `documentation/source/`
- Bundled dependency and build framework: `scarab/`

## Architecture At A Glance

- `core` owns AMQP connectivity and send/listen primitives.
- `message` and derived types (`msg_request`, `msg_reply`, `msg_alert`) implement protocol objects and chunking.
- `receiver` and `listener` manage chunk assembly and concurrent processing.
- `endpoint` implements request dispatch and lockout semantics.
- `service` composes endpoint + listener/receiver + heartbeater + scheduler.
- `hub` maps message specifiers to user-registered handlers.
- `agent` and `monitor` provide CLI-oriented message send/observe tooling.

## Build And Test Workflow

Preferred local workflow (from repo root):

1. Configure
- `cmake -S . -B build`
2. Build
- `cmake --build build -j`
3. Run tests
- `./build/testing/run_dl_tests`

Common options:

- `-DDripline_ENABLE_TESTING=ON`
- `-DDripline_ENABLE_EXECUTABLES=ON`
- `-DDripline_BUILD_EXAMPLES=ON`
- `-DDripline_BUILD_PYTHON=ON` (only when needed)

If you add new source files, update the corresponding `CMakeLists.txt` target lists.

## Coding Style (Observed In This Codebase)

Follow existing style in the touched file. Do not reformat unrelated code.

### Formatting

- Use 4-space indentation; no tabs.
- Put opening braces on the next line for classes/functions/control blocks.
- Use the project's spacing pattern, e.g. `if( condition )`, `catch( const std::exception& e )`.
- Keep lines reasonably readable; avoid large-scale wrapping churn.

### File Structure

- Header/source pairs use `.hh` and `.cc`.
- Header guards are uppercase with `_HH_` suffix (example pattern: `DRIPLINE_FOO_HH_`).
- Most files include a top block comment with file name, date, author; preserve existing header blocks.

### Includes

- In `.cc` files, include the matching local header first.
- Then include project headers, then external/library headers, then standard headers.
- Preserve the local ordering conventions in each file when editing.

### Namespaces And Types

- Core namespace is `dripline`.
- Prefer existing alias style in a file (`using`, `typedef`) instead of forcing one style.
- Keep API/export macros where used (`DRIPLINE_API`, `DRIPLINE_API_EXPORTS`).

### Class And Member Conventions

- Member fields commonly use `f_` prefix (`f_status`, `f_channel`, etc.).
- Accessor macros from Scarab are widely used (`mv_accessible`, `mv_referrable`, etc.); use them consistently in nearby code.
- Keep move/copy semantics explicit where already established.

### Error Handling And Logging

- Prefer explicit exception types used by this project (`dripline_error`, `connection_error`, AMQP exceptions).
- Preserve message-rich error text using stream-style construction.
- Use logger macros already present in the file (`LOGGER`, `LDEBUG`, `LINFO`, `LWARN`, `LERROR`).

### Const And Parameter Passing

- Prefer `const` correctness and pass heavy objects by `const &`.
- Follow existing pointer ownership style (`std::shared_ptr`, project typedefs).

## Testing Expectations For Changes

- Add or update tests in `testing/` when behavior changes.
- Prefer focused tests near related existing suites (agent/core/service/message/etc.).
- Do not weaken existing assertions to make tests pass.

## Agent Working Rules

- Make minimal, targeted edits.
- Preserve public behavior unless the task explicitly changes behavior.
- Avoid speculative refactors during bug fixes.
- Update docs/comments when behavior or configuration changes.
- Keep cross-component compatibility in mind (`dripline-python`, protocol constants, and wire expectations).

## When Unsure

- Prefer consistency with nearest surrounding code over generic modern C++ style advice.
- If patterns conflict across files, match the pattern used in the file you are editing.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required (VERSION 3.12)
#########

cmake_policy( SET CMP0048 NEW ) # version in project()
project( Dripline VERSION 2.10.11 )
project( Dripline VERSION 2.10.12 )

list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/scarab/cmake )

Expand Down
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ Types of changes: Added, Changed, Deprecated, Removed, Fixed, Security
## [Unreleased]


## [2.10.12] -- 2026-06-05

### Changed

- Modified GHA workflow to allow keeping of test-build images


## [2.10.11] -- 2026-01-23

### Changed
Expand Down