Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d4776a5
fix: remove CMakeList benchmarks and tools dirs
flyingrobots Jul 21, 2025
646c269
fix: achieve 100% POSIX shell compliance across all scripts
flyingrobots Jul 22, 2025
bb2c64f
fix: improve clang-tidy error reporting and include paths
flyingrobots Jul 22, 2025
bcc3623
feat: add automated dev container image building
flyingrobots Jul 22, 2025
fd5a182
chore: rename 'Meta-Graph' to 'MetaGraph'
flyingrobots Jul 22, 2025
9717d75
chore: rename 'Meta-Graph' to 'MetaGraph'
flyingrobots Jul 22, 2025
94a7dfb
chore: rename 'Meta-Graph' to 'MetaGraph'
flyingrobots Jul 22, 2025
24f4bfd
fix: echo for colors in security-audit.sh
flyingrobots Jul 22, 2025
6a983f8
fix: echo for colors in security-audit.sh
flyingrobots Jul 22, 2025
55a08d1
fix: echo for colors in security-audit.sh
flyingrobots Jul 22, 2025
6a6eae8
fix: changes needed to build and pre-push
flyingrobots Jul 22, 2025
759232e
fix: pie already enabled on OSX
flyingrobots Jul 22, 2025
55fd04e
fix: performance profiler script works
flyingrobots Jul 22, 2025
04f6497
fix: instructions to install were wrong
flyingrobots Jul 22, 2025
b60468a
fix: fixes for profiler
flyingrobots Jul 22, 2025
f566233
feat: add Fort Knox release pipeline scripts
flyingrobots Jul 22, 2025
c842fa5
feat: add GitHub Actions workflows for Fort Knox CI/CD
flyingrobots Jul 22, 2025
62d94c4
feat: add Docker images for deterministic builds
flyingrobots Jul 22, 2025
05c4216
docs: add Fort Knox release process documentation
flyingrobots Jul 22, 2025
f419fca
refactor: simplify version management to static version.h
flyingrobots Jul 22, 2025
b837751
feat: add PR gatekeeper and update README
flyingrobots Jul 22, 2025
d5d919c
fix: disable IWYU on macOS due to incorrect header suggestions
flyingrobots Jul 22, 2025
f07ad2c
test: add benchmark tool
flyingrobots Jul 22, 2025
3f2a01d
feat: add error handling and CMake version generation
flyingrobots Jul 23, 2025
a622864
fix: update CMakeLists.txt to use metagraph::metagraph alias
flyingrobots Jul 23, 2025
b62fa44
fix: remove tracked compile_commands.json and update .gitignore
flyingrobots Jul 23, 2025
2e81b40
Merge pull request #65 from meta-graph/feat/docker-dev-container-image
flyingrobots Jul 23, 2025
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
69 changes: 28 additions & 41 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
# HyperDAG clang-tidy Configuration
# MetaGraph clang-tidy Configuration
# EXTREME quality standards - ALL warnings are errors

# Enable comprehensive check coverage
Checks: '
*,
-abseil-*,
-altera-*,
-android-*,
-darwin-*,
-fuchsia-*,
-google-build-using-namespace,
-google-readability-avoid-underscore-in-googletest-name,
-google-readability-todo,
-hicpp-named-parameter,
-hicpp-no-array-decay,
-hicpp-signed-bitwise,
-llvm-header-guard,
-llvmlibc-*,
-modernize-use-trailing-return-type,
-readability-identifier-length,
-zircon-*
'
Checks: >
-*,
bugprone-*,
cert-*,
clang-analyzer-*,
concurrency-*,
misc-*,
performance-*,
portability-*,
readability-*,
-readability-magic-numbers

# ALL warnings become compilation errors - zero tolerance
WarningsAsErrors: '*'
Expand All @@ -30,7 +22,7 @@ HeaderFilterRegex: '(include|src)/.*\.(h|c)$'

# Check configuration
CheckOptions:
# Naming conventions for HyperDAG
# Naming conventions for MetaGraph
- key: readability-identifier-naming.TypedefCase
value: lower_case
- key: readability-identifier-naming.TypedefSuffix
Expand All @@ -44,27 +36,27 @@ CheckOptions:
- key: readability-identifier-naming.EnumConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.EnumConstantPrefix
value: 'HYPERDAG_'
value: 'METAGRAPH_'
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.FunctionPrefix
value: 'hyperdag_'
value: 'metagraph_'
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.MacroDefinitionPrefix
value: 'HYPERDAG_'
value: 'METAGRAPH_'
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.GlobalConstantPrefix
value: 'HYPERDAG_'
value: 'METAGRAPH_'

# Function complexity limits
- key: readability-function-cognitive-complexity.Threshold
value: '15'
value: '25'
- key: readability-function-size.LineThreshold
value: '50'
- key: readability-function-size.StatementThreshold
Expand All @@ -74,34 +66,34 @@ CheckOptions:
- key: readability-function-size.ParameterThreshold
value: '6'
- key: readability-function-size.NestingThreshold
value: '4'
value: '5'

# Memory safety
- key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
value: true
- key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
value: true
- key: cert-err33-c.CheckedFunctions
value: '::aligned_alloc;::calloc;::clock;::fclose;::ferror;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fprintf;::fputc;::fputs;::fputwc;::fread;::freopen;::fscanf;::fseek;::fsetpos;::ftell;::fwprintf;::fwrite;::fwscanf;::getc;::getchar;::gets;::getwc;::getwchar;::gmtime;::localtime;::malloc;::mbrtowc;::mbsrtowcs;::mbstowcs;::memchr;::mktime;::printf;::putc;::putchar;::puts;::putwc;::putwchar;::raise;::realloc;::remove;::rename;::scanf;::setlocale;::setvbuf;::signal;::snprintf;::sprintf;::sscanf;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtol;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swscanf;::time;::tmpfile;::tmpnam;::ungetc;::ungetwc;::vfprintf;::vfscanf;::vfwprintf;::vfwscanf;::vprintf;::vscanf;::vsnprintf;::vsprintf;::vsscanf;::vswprintf;::vswscanf;::vwprintf;::vwscanf;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstol;::wcstoll;::wcstombs;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wmemchr;::wprintf;::wscanf'

# Performance
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: false
- key: performance-no-automatic-move.AllowedTypes
value: ''

# Modernize to C23
- key: modernize-replace-auto-ptr.IncludeStyle
value: google
- key: modernize-use-auto.MinTypeNameLength
value: '5'
- key: modernize-use-auto.RemoveStars
value: false

# Portability
- key: portability-restrict-system-includes.Includes
value: '*'

# Thread safety
- key: misc-misplaced-const.CheckPrimitiveCasts
value: true
Expand All @@ -113,13 +105,8 @@ SystemHeaders: false
UseColor: true

# Enable all available experimental checks
ExtraArgs:
- '-std=c23'
- '-Wextra'
- '-Wall'
- '-Wpedantic'
- '-Wno-unused-parameter' # Common in function pointer interfaces
- '-Wno-gnu-zero-variadic-macro-arguments' # Allow empty __VA_ARGS__
# Note: When using compilation database, extra args should be passed via command line
# to avoid being interpreted as file paths

# Performance: run checks in parallel
# Parallel: true # Not supported in this clang-tidy version
# Parallel: true # Not supported in this clang-tidy version
103 changes: 42 additions & 61 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,63 +1,44 @@
{
"name": "HyperDAG C23 Development",
"image": "silkeh/clang:18",

"features": {
"ghcr.io/devcontainers/features/cmake:1": {
"version": "latest"
"name": "MetaGraph C23 Development",
"build": {
"dockerfile": "../Dockerfile.dev",
"context": "."
},
"features": {},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cmake-tools",
"twxs.cmake",
"notskm.clang-tidy",
"xaver.clang-format",
"eamodio.gitlens",
"editorconfig.editorconfig",
"vadimcn.vscode-lldb",
"cschlosser.doxdocgen",
"ms-azuretools.vscode-docker"
],
"settings": {
"C_Cpp.default.cStandard": "c23",
"C_Cpp.default.compilerPath": "/usr/bin/clang",
"C_Cpp.default.intelliSenseMode": "linux-clang-x64",
"cmake.configureSettings": {
"CMAKE_BUILD_TYPE": "Debug",
"METAGRAPH_DEV": "ON",
"METAGRAPH_SANITIZERS": "ON",
"CMAKE_C_COMPILER": "/usr/bin/clang"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest"
}
},

"postCreateCommand": "./scripts/setup-dev-env.sh --skip-vscode",

"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cmake-tools",
"twxs.cmake",
"notskm.clang-tidy",
"xaver.clang-format",
"eamodio.gitlens",
"editorconfig.editorconfig",
"vadimcn.vscode-lldb",
"cschlosser.doxdocgen",
"ms-azuretools.vscode-docker"
],
"settings": {
"C_Cpp.default.cStandard": "c23",
"C_Cpp.default.compilerPath": "/usr/bin/clang",
"C_Cpp.default.intelliSenseMode": "linux-clang-x64",
"cmake.configureSettings": {
"CMAKE_BUILD_TYPE": "Debug",
"HYPERDAG_DEV": "ON",
"HYPERDAG_SANITIZERS": "ON",
"CMAKE_C_COMPILER": "/usr/bin/clang"
},
"terminal.integrated.defaultProfile.linux": "bash"
}
}
},

"mounts": [
"source=${localWorkspaceFolder}/.git,target=/workspace/.git,type=bind,consistency=cached"
],

"workspaceFolder": "/workspace",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",

"forwardPorts": [],

"containerEnv": {
"ASAN_OPTIONS": "abort_on_error=1:halt_on_error=1:print_stats=1",
"UBSAN_OPTIONS": "abort_on_error=1:halt_on_error=1:print_stacktrace=1",
"CC": "clang",
"CXX": "clang++"
},

"remoteUser": "root"
}
"terminal.integrated.defaultProfile.linux": "bash"
}
}
},
"containerEnv": {
"ASAN_OPTIONS": "abort_on_error=1:halt_on_error=1:print_stats=1",
"UBSAN_OPTIONS": "abort_on_error=1:halt_on_error=1:print_stacktrace=1",
"CC": "clang",
"CXX": "clang++"
},
"remoteUser": "root"
}
41 changes: 41 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# MetaGraph Code Owners
# These owners will be automatically requested for review when someone
# opens a pull request modifying the matching files.

# Global owners (fallback)
* @meta-graph/maintainers

# Core library
/src/ @meta-graph/core-team
/include/ @meta-graph/core-team
/tests/ @meta-graph/core-team

# Build system
/CMakeLists.txt @meta-graph/build-team
/cmake/ @meta-graph/build-team
*.cmake @meta-graph/build-team

# Documentation
/docs/ @meta-graph/docs-team
*.md @meta-graph/docs-team
/CONTRIBUTING.md @meta-graph/maintainers
/SECURITY.md @meta-graph/security-team

# Scripts and tooling
/scripts/ @meta-graph/devops-team
/.github/ @meta-graph/devops-team
/docker/ @meta-graph/devops-team

# Security-critical files
/src/crypto/ @meta-graph/security-team
/src/validation/ @meta-graph/security-team
/scripts/security-audit.sh @meta-graph/security-team

# Release process
/scripts/prepare-release.sh @meta-graph/maintainers
/scripts/cut-release.sh @meta-graph/maintainers
/docs/RELEASE.md @meta-graph/maintainers

# Third-party dependencies
/docs/3rd-party.md @meta-graph/maintainers
/cmake/ThirdPartyDependencies.cmake @meta-graph/maintainers
47 changes: 47 additions & 0 deletions .github/actions/setup-build-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Setup Build Environment'
description: 'Setup consistent build environment across platforms'
inputs:
os:
description: 'Operating system'
required: true

runs:
using: 'composite'
steps:
- name: Setup Windows
if: inputs.os == 'Windows'
shell: bash
run: |
choco install cmake ninja llvm --version=18.0.0 -y
echo "C:\Program Files\LLVM\bin" >> $GITHUB_PATH

- name: Setup Linux
if: inputs.os == 'Linux'
shell: bash
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo apt-get update
sudo apt-get install -y \
cmake ninja-build \
clang-18 clang-tidy-18 clang-format-18 \
libssl-dev

- name: Setup macOS
if: inputs.os == 'macOS'
shell: bash
run: |
brew update
brew install cmake ninja llvm@18
echo "/opt/homebrew/opt/llvm@18/bin" >> $GITHUB_PATH
echo "/usr/local/opt/llvm@18/bin" >> $GITHUB_PATH

- name: Verify tools
shell: bash
run: |
echo "Tool versions:"
cmake --version
ninja --version
clang --version || clang-18 --version
echo "Build environment ready!"
Loading
Loading