Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
0d064c7
feat(libuv): implement Spine 2.0 asynchronous engine
somethingwithproof Apr 20, 2026
d26693f
fix(async): explicit batch flush at shutdown
somethingwithproof Apr 20, 2026
2a735b0
doc(async_dns): spell out watcher-lifetime invariant in on_poll
somethingwithproof Apr 20, 2026
7913006
fix(async_mysql): shutdown-fence new queries
somethingwithproof Apr 20, 2026
2bbc5b8
obs+ci: log setrlimit failure; daily Dockerfile digest refresh
somethingwithproof Apr 20, 2026
f0c1157
refactor(creds): unify scrub via spine_bzero; cover engine_id+context
somethingwithproof Apr 20, 2026
2455624
fix(shutdown): flush batch before fencing async mysql submissions
somethingwithproof Apr 20, 2026
11a2f6e
fix(redact): correct SNMPv3 short-flag list to real net-snmp flags
somethingwithproof Apr 20, 2026
a03720e
fix(async_dns): real wall-clock drain deadline; no UAF on timeout
somethingwithproof Apr 20, 2026
66d5b3f
fix(cb): reap on idle daemon; bound reap batch; injectable clock
somethingwithproof Apr 20, 2026
17a350f
fix(async): _Atomic flags for leak counter and mysql shutdown fence
somethingwithproof Apr 20, 2026
c48d710
test(redact): align buffer width with spine.h BUFSIZE
somethingwithproof Apr 20, 2026
5184d65
obs: export CB stats and async_mysql shutdown-refused count
somethingwithproof Apr 20, 2026
5a33412
test: add CB reap, async_mysql shutdown, and async_exec invariant tests
somethingwithproof Apr 20, 2026
7999e98
test+fix: wire new tests to CMake; harden round-2 fixes
somethingwithproof Apr 20, 2026
303ff25
refactor: extract SPINE_SHUTDOWN_DRAIN_SECS; cross-file consistency
somethingwithproof Apr 20, 2026
cfd00ac
fix(util): replace atoi in config parser with range-safe spine_atoi
somethingwithproof Apr 20, 2026
7e97bc0
fix+refactor: self-review round 4 cleanup
somethingwithproof Apr 20, 2026
102f728
fix: shutdown metrics log level; extern spine_parse_int; NS constant
somethingwithproof Apr 21, 2026
2806dda
fix(sandbox): do not silently ignore seccomp TSYNC failure
somethingwithproof Jun 24, 2026
ee67c19
fix(scheduler): check calloc results and fix inflight_count signedness
somethingwithproof Jun 24, 2026
d198d65
harden(sandbox): restrict OpenBSD execpromises for exec'd scripts
somethingwithproof Jun 24, 2026
7e50306
fix: define libuv loop state and poller queue links
somethingwithproof Jul 14, 2026
b79c74f
fix: complete async PHP worker state definition
somethingwithproof Jul 14, 2026
d6707bc
chore: remove accidental worktree gitlinks
somethingwithproof Jul 14, 2026
58cab6d
fix: make util header self-contained for unit tests
somethingwithproof Jul 14, 2026
8bbaa0a
fix: make container and test builds portable
somethingwithproof Jul 14, 2026
f4e268e
fix: avoid MySQL typedef collision and install uthash
somethingwithproof Jul 14, 2026
5ef4908
fix: include MySQL client type in util header
somethingwithproof Jul 14, 2026
c1ec060
ci: install uthash for all CMake build lanes
somethingwithproof Jul 14, 2026
45c1036
fix: link focused tests with required runtime sources
somethingwithproof Jul 14, 2026
1489197
ci: build production target independently of focused tests
somethingwithproof Jul 14, 2026
8ce3c65
ci: skip focused tests in production-only build lanes
somethingwithproof Jul 14, 2026
01eda55
ci: satisfy workflow shell safety policy
somethingwithproof Jul 14, 2026
8aba2f5
ci: install libuv and test headers in integration builds
somethingwithproof Jul 14, 2026
fb486aa
ci: skip unbuilt focused tests in distro production lanes
somethingwithproof Jul 14, 2026
2bab9d0
ci: include libuv and uthash in shared integration dependencies
somethingwithproof Jul 14, 2026
491f73a
ci: keep distro CTest guard POSIX-shell compatible
somethingwithproof Jul 14, 2026
048639d
ci: use bash for container test steps
somethingwithproof Jul 14, 2026
acb150e
test: link focused async coverage utilities
somethingwithproof Jul 14, 2026
90524f4
ci: fix scorecard CLI installation path
somethingwithproof Jul 14, 2026
82825c2
ci: harden workflow inputs and dependabot updates
somethingwithproof Jul 14, 2026
aef02d1
ci: install uthash for fuzz smoke builds
somethingwithproof Jul 14, 2026
1ec406c
ci: install uthash for coverage and analysis jobs
somethingwithproof Jul 14, 2026
6598ebf
ci: rewrite enterprise build and test pipeline
somethingwithproof Jul 14, 2026
ee77d7d
fix: link platform runtime into redact-args test
somethingwithproof Jul 14, 2026
85753f6
fix: avoid duplicate platform source in async test
somethingwithproof Jul 14, 2026
d1b3c91
test: align redaction assertion with credential policy
somethingwithproof Jul 14, 2026
8483c1a
ci: move heavy platform checks off pull-request gate
somethingwithproof Jul 14, 2026
b1b75bd
ci: complete CodeQL dependencies and make Docker fixture advisory
somethingwithproof Jul 14, 2026
784c29f
ci: run Docker fixture outside pull-request gate
somethingwithproof Jul 14, 2026
c642db0
ci: configure enterprise Dependabot updates
somethingwithproof Jul 14, 2026
3679388
chore: remove local agent state
somethingwithproof Aug 22, 2026
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
10 changes: 10 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
Checks: >
clang-analyzer-*,
bugprone-*,
cert-*,
-cert-err58-cpp
WarningsAsErrors: ""
HeaderFilterRegex: ".*"
FormatStyle: none
...
12 changes: 12 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CompileFlags:
CompilationDatabase: build
Add:
- -I./build/config
- -I.
- -I./src
- -I./src/platform
- -I./third_party
Diagnostics:
UnusedIncludes: None
Suppress:
- pp_file_not_found
2 changes: 2 additions & 0 deletions .codespell-ignore-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
te
caf
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "spine dev",
"image": "mcr.microsoft.com/devcontainers/cpp:ubuntu-24.04",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true
},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y libsnmp-dev libmariadb-dev-compat libssl-dev libsystemd-dev pkg-config cmake ninja-build cppcheck clang-tools && cmake -G Ninja -S . -B build -DSPINE_BUILD_MAIN=ON && cmake --build build -j",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"llvm-vs-code-extensions.vscode-clangd",
"twxs.cmake",
"ms-vscode.cmake-tools",
"github.vscode-github-actions",
"github.vscode-pull-request-github"
],
"settings": {
"C_Cpp.intelliSenseEngine": "disabled",
"clangd.arguments": [
"--background-index",
"--compile-commands-dir=build"
]
}
}
},
"remoteUser": "vscode"
}
21 changes: 15 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# Test fixtures and CI scripts -- not needed for the spine build
tests/
# Test fixtures and CI scripts -- allowed for test images
# tests/
.git/
*.md
config/
.github/
.claude/
.omc/
.worktrees/
build/
build-*/
# build-reports/
# *.md
m4/
autom4te.cache/
.omc/
*.conf.dist
*.log
*.o
*.a
*.so
*.dylib
.php-cs-fixer.cache
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If applicable, add screenshots to help explain your problem.
**Compiling (please complete the following information):**

- compiler: [e.g. clang or gcc 5.4.0]
- autoconf: [e.g. autoconf 2.69]
- cmake: [e.g. cmake 3.22]
- glibc: [e.g. 2.23]
- source: [e.g. release or github]

Expand Down
30 changes: 30 additions & 0 deletions .github/actions/install-apt-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Install apt dependencies
description: Update apt cache and install a whitespace-delimited package list.
inputs:
packages:
description: Whitespace-delimited package names to install.
required: true
runs:
using: composite
steps:
- name: Install packages
shell: bash
env:
INSTALL_APT_DEPS_PACKAGES: ${{ inputs.packages }}
run: |
set -euo pipefail
# Reject anything outside the apt-package grammar. Callers pass a
# static whitespace-delimited list; this blocks shell metacharacters
# even though the input comes from workflow YAML.
# tr-d approach: strip allowed chars (alnum, . _ + - space tab);
# anything remaining is disallowed. The \- escapes hyphen so it is
# not treated as a range specifier by tr.
_bad=$(printf '%s' "$INSTALL_APT_DEPS_PACKAGES" | LC_ALL=C tr -d 'A-Za-z0-9._+\- \t')
if [ -n "$_bad" ]; then
echo "install-apt-deps: rejecting packages string with disallowed characters: $_bad" >&2
exit 2
fi
unset _bad
sudo apt-get update
# shellcheck disable=SC2086 # intentional word-splitting of validated list
sudo apt-get install -y $INSTALL_APT_DEPS_PACKAGES
202 changes: 202 additions & 0 deletions .github/cppcheck-baseline.txt

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
version: 2

updates:
# Workflow actions are supply-chain dependencies. Keep them current, but
# group routine updates so the PR queue stays reviewable.
- package-ecosystem: github-actions
directory: /
target-branch: develop
schedule:
interval: weekly
day: monday
time: '06:00'
timezone: America/Los_Angeles
open-pull-requests-limit: 5
cooldown:
default-days: 7
groups:
actions:
patterns: ['*']
labels: [dependencies, github-actions]
commit-message:
prefix: ci
include: scope

# The production image and the SNMPv3 integration image are maintained
# independently, so each directory gets its own bounded update stream.
- package-ecosystem: docker
directory: /docker
target-branch: develop
schedule:
interval: weekly
day: tuesday
time: '06:00'
timezone: America/Los_Angeles
open-pull-requests-limit: 3
cooldown:
default-days: 7
groups:
docker:
patterns: ['*']
labels: [dependencies, docker]
commit-message:
prefix: build
include: scope

- package-ecosystem: docker
directory: /tests/snmpv3
target-branch: develop
schedule:
interval: weekly
day: tuesday
time: '06:00'
timezone: America/Los_Angeles
open-pull-requests-limit: 3
cooldown:
default-days: 7
groups:
docker:
patterns: ['*']
labels: [dependencies, docker, tests]
commit-message:
prefix: test
include: scope

# Tabler is the only checked-in Node package. Keep application and tooling
# updates together because the package is built and linted as one unit.
- package-ecosystem: npm
directory: /include/tabler
target-branch: develop
schedule:
interval: weekly
day: wednesday
time: '06:00'
timezone: America/Los_Angeles
open-pull-requests-limit: 5
cooldown:
default-days: 7
groups:
npm:
patterns: ['*']
labels: [dependencies, javascript]
commit-message:
prefix: build
include: scope
20 changes: 12 additions & 8 deletions .github/instructions/instructions.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# GitHub Copilot Instructions for spine

spine is the high-performance C poller for Cacti. It is a multi-threaded
POSIX C99 program using pthreads, net-snmp, and libmariadb, built with
GNU autotools.
POSIX program using pthreads, net-snmp, libmariadb, and libuv, built with
CMake.

## Language and standard

- C99. Mixed declarations and statements are allowed. No VLAs.
- C17. Mixed declarations and statements are allowed. No VLAs.
- POSIX.1-2008 is the baseline. Do not use glibc extensions unless they
already appear in the codebase.
- All new files must include the LGPL-2.1 header block found in `spine.c`.

## Build system

- `configure.ac` + `Makefile.am`. Run `./bootstrap` to regenerate.
- AC_PREREQ is 2.69. Do not add macros deprecated before autoconf 2.69
(AC_C_CONST, AC_STRUCT_TM, RETSIGTYPE, etc.). AC_HEADER_TIME is used
and must be kept because common.h guards with TIME_WITH_SYS_TIME.
- `make -j$(nproc) CFLAGS="-Wall -Wextra"` must produce zero warnings.
- CMake >= 3.15, driven from `CMakeLists.txt` with helpers under `cmake/`.
- `cmake -S . -B build -G Ninja && cmake --build build` is the canonical
build. CMakePresets.json exposes `ci-smoke` and `ci-main`.
- `cmake --build build` with `-Wall -Wextra` must produce zero warnings.

## Code conventions

Expand All @@ -32,6 +31,9 @@ GNU autotools.
bounds.
- String buffers: declare length constants; do not use magic numbers for
buffer sizes.
- Public APIs: prefer `const char *` for input-only string parameters.
Document ownership expectations in function comments when transfer is not
obvious.

## SNMP

Expand Down Expand Up @@ -62,6 +64,8 @@ GNU autotools.
- Before opening a PR, run `cppcheck --enable=all --std=c11 *.c *.h`
locally and fix all errors (warnings are informational).
- flawfinder level-5 hits fail CI; lower levels are informational.
- CI has a guardrail for newly introduced unsafe C APIs (`sprintf`, `strcpy`,
`strcat`, `gets`, `vsprintf`) and fails closed on additions.

## Commits and PRs

Expand Down
8 changes: 8 additions & 0 deletions .github/lint-codespell-globs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.c
*.h
*.md
*.txt
*.yml
*.yaml
CMakeLists.txt
cmake/*.cmake
10 changes: 10 additions & 0 deletions .github/lint-shell-files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
debug
package
scripts/copyright_year.sh
scripts/lint-codespell.sh
scripts/lint-shell.sh
scripts/preflight.sh
scripts/test-distros.sh
scripts/test-vagrant.sh
scripts/test-workflows.sh
scripts/verify.sh
12 changes: 12 additions & 0 deletions .github/nightly-leak-baseline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"valgrind": {
"max_definitely_lost_bytes": 0,
"max_indirectly_lost_bytes": 0,
"max_possibly_lost_bytes": 0,
"max_error_summary": 0
},
"asan": {
"max_asan_error_events": 0,
"max_ubsan_error_events": 0
}
}
20 changes: 20 additions & 0 deletions .github/perf-baseline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"sample_size": 20,
"commands": {
"./spine --version": {
"median_seconds": 0.35,
"allowed_regression_factor": 1.5,
"max_rss_kb": 32768
},
"./spine --help": {
"median_seconds": 0.45,
"allowed_regression_factor": 1.5,
"max_rss_kb": 40960
},
"snmpget -v2c -c public -On 127.0.0.1:1161 1.3.6.1.2.1.1.3.0": {
"median_seconds": 0.25,
"allowed_regression_factor": 2.0,
"max_rss_kb": 32768
}
}
}
Loading
Loading