Files
frameledger/.github/workflows/codeql.yml
T
poli0981andClaude Opus 5 5b61a20482 build: scaffold the repository the docs assume
Takes the project from docs-only to a state where the P0 spike can begin.
Everything here was verified to run, not just written.

Managed
  global.json pins the SDK band. Without it `dotnet --version` on this
  machine resolved to an 11.0 preview, which silently changes analyzer
  behaviour under TreatWarningsAsErrors and makes local and CI disagree
  for reasons invisible in a diff. Not mentioned in any doc; added to
  12_BUILD.

  TargetFramework net10.0-windows10.0.22621.0 with
  SupportedOSPlatformVersion 10.0.19045.0. The plan called for a 19041
  target, but the SDK rejects SupportedOSPlatformVersion above
  TargetPlatformVersion (NETSDK1135), and 19045 is not a targeting-pack
  version — the packs are cut at 19041/20348/22000/22621/26100.
  12_BUILD already requires the Windows 11 SDK >= 22621, so targeting it
  costs nothing while CA1416 still enforces the 22H2 floor from NFR-8.

  Solution is FrameLedger.slnx: the XML format is what `dotnet new sln`
  produces on .NET 10, and it diffs far better than the classic format.

  Six projects plus three test projects, wired to the dependency
  direction CLAUDE.md specifies. Builds warning-free under
  TreatWarningsAsErrors + AnalysisLevel=latest-all; the only analyzer
  suppressions are three WPF codegen constraints, scoped to
  src/FrameLedger.App and each explained in .editorconfig.

  Pinned SQLitePCLRaw forward: Microsoft.Data.Sqlite 10.0.10 resolves
  lib.e_sqlite3 2.1.11, which carries GHSA-2m69-gcr7-jv3q. The build
  failed on it, correctly.

  Pinned FluentAssertions to the 7.x line. 8.0.0 moved from Apache-2.0
  to Xceed's Community Licence, which is not OSI and carries
  field-of-use restrictions — exactly what 18_GPU_VENDOR_APIS's vendor
  checklist rejects. Dependabot is configured not to major-bump it.

Native
  fl_shm.h is the valuable artifact: the corrected four-region layout,
  with static_asserts on every size and offset. Compile-verified — all
  four structs are exactly 64 bytes with no implicit holes, and the
  mapping is 512 KiB + 192 B of header. fl-layout-dump emits those
  offsets as JSON for the C# mirror test to consume.

  /guard:cf and -D_HAS_EXCEPTIONS=0 are deliberately NOT applied to the
  Overlay target yet. Both are unresolved (20_OPEN_QUESTIONS H1, H3);
  applying them now would mean meeting the problem as a crash in a real
  game rather than as a decision.

  Not compiled: this machine has no MSVC C++ workload, so the CMake
  targets are unverified. The headers were checked with g++ instead.

Gates
  build.ps1 check runs the nine gates, and CI runs that same script.
  Gates skip loudly — the run ends "PASSED WITH N SKIPPED GATE(S)"
  rather than a clean pass, because a gate that silently passes because
  its tool is missing reads as "checked" when nothing was checked.

  license-check and rules-validate are real, and were proven red-green
  before being wired in: a planted IGCL header fails the licence gate,
  and an emptied anticheat.modules list (or a dropped BattlEye entry, or
  malformed JSON) fails the rules gate. A safety gate only ever observed
  passing has not been tested.

  Added a placeholder guard: any {{ token other than {{RELEASE_DATE}}
  surviving in README.md or legal/*.md fails the build. Those documents
  are displayed for acceptance under FR-11.

  rules/detection-rules.json is seeded with a non-empty anticheat block.
  An empty one is a fail-closed fixture, not a ship state.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-02 17:38:39 +07:00

72 lines
1.7 KiB
YAML

# CodeQL for C# AND C++ (docs/13_CI_CD.md).
#
# The native layer is where memory-safety bugs would live — a lock-free ring
# written from inside a host process we do not own. Scanning only the managed
# side would defeat the purpose.
#
# Repo-local for now. The ops repo has codeql-mixed.yml, but C++ needs manual
# build mode driven by the CMake preset, and that input surface has not been
# verified. Switch to a caller stub once it has.
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '27 4 * * 1'
permissions:
contents: read
security-events: write
jobs:
analyze:
runs-on: windows-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- language: csharp
build-mode: none
- language: cpp
build-mode: manual
steps:
- uses: actions/checkout@v4
- name: Set up .NET
if: matrix.language == 'csharp'
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Set up MSVC (x64)
if: matrix.language == 'cpp'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Build native
if: matrix.language == 'cpp'
shell: pwsh
run: |
cmake --preset x64-release
cmake --build --preset x64-release
working-directory: src/native
- name: Analyze
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}