Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2015 commits
Select commit Hold shift + click to select a range
ec8d794
refactor: move awaitable binding aggregation
createreadupdate Jun 25, 2026
1d0d1ae
refactor: move mcp binding method table aggregation
createreadupdate Jun 25, 2026
d91b424
feat: add native graph inference streaming
createreadupdate Jun 25, 2026
3762a5d
feat: expose native inference stream metrics
createreadupdate Jun 25, 2026
359b4d4
docs: document native graph inference streaming
createreadupdate Jun 25, 2026
8e7cac5
fix: guard openai generation backends
createreadupdate Jun 25, 2026
e29600b
feat: expose king model capabilities in openai router
createreadupdate Jun 25, 2026
90a59f4
feat: complete inference static facade
createreadupdate Jun 25, 2026
16f6e9c
fix: report invalid openai backend capabilities
createreadupdate Jun 25, 2026
3fc24e9
fix: clarify inference gpu capabilities
createreadupdate Jun 25, 2026
cb50489
fix: scope native token selection capability
createreadupdate Jun 25, 2026
d966a6a
fix: validate inference generation options
createreadupdate Jun 25, 2026
9385360
fix: validate local inference stop options
createreadupdate Jun 25, 2026
38ce073
fix: bound native graph stream startup
createreadupdate Jun 25, 2026
7930af7
fix: reject non-finite inference numeric options
createreadupdate Jun 25, 2026
ae08b4d
feat: allow native graph requests in openai router
createreadupdate Jun 25, 2026
d24e76e
fix: validate native graph openai options
createreadupdate Jun 25, 2026
5f508e4
refactor: split openai backend routing checks
createreadupdate Jun 25, 2026
a64c09b
fix: validate responses native graph source payload
createreadupdate Jun 25, 2026
bc8f1e7
fix: validate openai stream options
createreadupdate Jun 25, 2026
27424ef
fix: validate openai stream flag
createreadupdate Jun 25, 2026
8f4817f
fix: validate openai model field
createreadupdate Jun 25, 2026
7eda808
docs: document extension source layout
createreadupdate Jun 25, 2026
eaa0703
fix: validate openai choice count
createreadupdate Jun 25, 2026
850ece0
fix: reject unsupported openai generation features
createreadupdate Jun 25, 2026
19f9ce9
fix: bound openai completions prompt batches
createreadupdate Jun 25, 2026
a3d2137
fix: bound openai generation input lists
createreadupdate Jun 25, 2026
5081210
fix: validate openai embedding router limits
createreadupdate Jun 25, 2026
bd67749
fix: validate openai drain controls
createreadupdate Jun 25, 2026
9ec7c33
fix: validate openai model listing options
createreadupdate Jun 25, 2026
5924a21
fix: validate openai router JSON bodies
createreadupdate Jun 25, 2026
b0ed6ed
fix: validate direct openai chat JSON body
createreadupdate Jun 25, 2026
0ec14cd
fix: resolve listed openai model ids
createreadupdate Jun 25, 2026
139388f
fix: stabilize openai model created metadata
createreadupdate Jun 25, 2026
cacfd47
fix: reject duplicate openai model ids
createreadupdate Jun 25, 2026
1294736
refactor: split openai http request helpers
createreadupdate Jun 25, 2026
bbdf29a
refactor: split openai model registry helpers
createreadupdate Jun 25, 2026
a629c45
docs: clarify mcp public header contract
createreadupdate Jun 25, 2026
c3f67c0
docs: align inference layout with current modules
createreadupdate Jun 25, 2026
02d7fe8
chore: remove placeholder terminology from active sources
createreadupdate Jun 25, 2026
bf66168
docs: clarify config snapshot get contract
createreadupdate Jun 25, 2026
af50827
fix: apply mcp server creation options
createreadupdate Jun 25, 2026
27abfac
fix: honor mcp connection timeout defaults
createreadupdate Jun 25, 2026
8c41777
fix: honor awaitable zero-timeout polling
createreadupdate Jun 25, 2026
08e3542
fix: reject unsupported xslt options
createreadupdate Jun 25, 2026
330447a
fix: preflight local inference runner
createreadupdate Jun 25, 2026
e24adaf
fix: default inference to native cpu backend
createreadupdate Jun 25, 2026
d1ccb04
fix: validate inference artifact config
createreadupdate Jun 25, 2026
e8b4cf1
fix: validate inference model metadata
createreadupdate Jun 25, 2026
9a2fa0f
fix: validate inference gpu config
createreadupdate Jun 25, 2026
8179b61
fix: validate openai option objects
createreadupdate Jun 25, 2026
75b6686
fix: validate responses instructions
createreadupdate Jun 25, 2026
391a008
fix: validate direct inference streams
createreadupdate Jun 25, 2026
bf63300
fix: validate inference stream constructor
createreadupdate Jun 25, 2026
cc35396
fix: expose inference facade stubs
createreadupdate Jun 25, 2026
53232d9
fix: validate xslt path types
createreadupdate Jun 25, 2026
b5bd8d2
fix: write xslt output atomically
createreadupdate Jun 25, 2026
2e0c30a
refactor: move async modules into owning units
createreadupdate Jun 25, 2026
5c4c159
refactor: localize async module arginfo
createreadupdate Jun 25, 2026
a36926f
refactor: move xslt binding ownership
createreadupdate Jun 25, 2026
dcbd029
refactor: move media binding ownership
createreadupdate Jun 25, 2026
91a892e
refactor: move autoscaling class ownership
createreadupdate Jun 25, 2026
533c114
refactor: move object store class ownership
createreadupdate Jun 25, 2026
18f398c
refactor: move pipeline orchestrator class ownership
createreadupdate Jun 25, 2026
c1e1a5f
refactor: move config class ownership
createreadupdate Jun 25, 2026
48c507b
refactor: move db ingest binding ownership
createreadupdate Jun 25, 2026
86e4a55
refactor: move client class ownership
createreadupdate Jun 25, 2026
8580fc6
refactor: move server class ownership
createreadupdate Jun 25, 2026
2ea8657
docs: align module ownership comments
createreadupdate Jun 25, 2026
2ed20c0
refactor: remove core method table aggregator
createreadupdate Jun 25, 2026
d042c54
fix: restore extension build after module split
createreadupdate Jun 25, 2026
bd9a5bc
fix: make native graph memory opt-in
createreadupdate Jun 25, 2026
e08c63e
feat: add inference memory config baseline
createreadupdate Jun 25, 2026
e83a812
fix: clean inference config warning and docs
createreadupdate Jun 25, 2026
77d7c79
fix: restore canonical CI contracts
createreadupdate Jun 25, 2026
0ce6aa0
fix: prepare legacy packaging trees for compatibility gates
createreadupdate Jun 25, 2026
b9fc494
ci: cache pinned lsquic runtime on local runner
createreadupdate Jun 25, 2026
05792a3
ci: support local docker buildx cache
createreadupdate Jun 25, 2026
61bdd57
test: prove native gguf inference stream
createreadupdate Jun 25, 2026
5c16660
fix: allow docker runtime package context
createreadupdate Jun 25, 2026
3cb9953
feat: add inference runtime model profiles
createreadupdate Jun 25, 2026
eda4832
feat: add graph memory llm cache policy
createreadupdate Jun 25, 2026
08c416c
fix: own worker gpu affinity ini string
createreadupdate Jun 25, 2026
a82b96a
ci: skip non-smokeable compatibility baselines
createreadupdate Jun 25, 2026
63e88a2
Add King local inference runner
createreadupdate Jun 25, 2026
09020d2
Add local GPU inference profile
createreadupdate Jun 25, 2026
1e79b88
Expose inference GPU runtime readiness
createreadupdate Jun 25, 2026
dbe283e
Probe CUDA driver for inference readiness
createreadupdate Jun 25, 2026
4eb2e75
Add inference VRAM admission status
createreadupdate Jun 26, 2026
26bb8d0
Expose inference KV cache VRAM estimate
createreadupdate Jun 26, 2026
469cf3c
Compare inference VRAM demand with free memory
createreadupdate Jun 26, 2026
5694602
Add inference GPU VRAM reserve
createreadupdate Jun 26, 2026
79fe6fb
Add inference GPU free VRAM floor
createreadupdate Jun 26, 2026
0fd0621
Add GPU thermal preflight before inference runs
createreadupdate Jun 26, 2026
722f70d
Abort GPU inference streams at thermal ceiling
createreadupdate Jun 26, 2026
84eba1a
Add GPU runtime refusal reasons
createreadupdate Jun 26, 2026
415ade9
Allow native GPU model registration
createreadupdate Jun 26, 2026
1c909f6
Expand native GPU backend capabilities
createreadupdate Jun 26, 2026
b41b2ea
Expose GPU decoder readiness in model info
createreadupdate Jun 26, 2026
3c701a5
Expose GPU generation readiness in model info
createreadupdate Jun 26, 2026
a7f1d72
Improve GPU OpenAI refusal message
createreadupdate Jun 26, 2026
ed008ae
Document VS Code GPU runtime model truth
createreadupdate Jun 26, 2026
b8e0275
Classify supported GGUF decoder architectures
createreadupdate Jun 26, 2026
220b171
Resolve token embedding tensor names
createreadupdate Jun 26, 2026
2c0ce0a
Resolve output projection tensor names
createreadupdate Jun 26, 2026
fae034e
Resolve attention projection tensor names
createreadupdate Jun 26, 2026
ee57578
Resolve RMSNorm tensor names
createreadupdate Jun 26, 2026
88f46ab
Resolve FFN tensor names
createreadupdate Jun 26, 2026
502b682
Build native CPU token decode graph
createreadupdate Jun 26, 2026
f458d13
Wire tokenizer output into decode graph
createreadupdate Jun 26, 2026
0db5837
Route local inference through native decode graph
createreadupdate Jun 26, 2026
8c25a07
Expose decode graph terminal projection
createreadupdate Jun 26, 2026
57fc532
Expose decode graph logits output
createreadupdate Jun 26, 2026
f1a33a9
Require KV state continuity in local inference
createreadupdate Jun 26, 2026
60f1ed5
Handle native inference stop tokens
createreadupdate Jun 26, 2026
4c2d65f
Add King-only hello world runner
createreadupdate Jun 26, 2026
5215c1e
Finalize argmax decoder selection
createreadupdate Jun 26, 2026
13c567d
Finalize temperature sampling contract
createreadupdate Jun 26, 2026
0f81e2a
Finalize top-k sampling contract
createreadupdate Jun 26, 2026
149a9d0
Finalize top-p sampling contract
createreadupdate Jun 26, 2026
1611c61
Finalize deterministic seed sampling
createreadupdate Jun 26, 2026
310d132
Stream native generated tokens
createreadupdate Jun 26, 2026
4a26b25
Emit OpenAI chunks for native streams
createreadupdate Jun 26, 2026
eeae207
Support native non-streaming OpenAI responses
createreadupdate Jun 26, 2026
72280f3
Cancel native decoder streams cleanly
createreadupdate Jun 26, 2026
6e354f6
Surface native decoder stream metrics
createreadupdate Jun 26, 2026
444c929
Open King CUDA context
createreadupdate Jun 26, 2026
91ae7fc
Add CUDA device memory allocator
createreadupdate Jun 26, 2026
50c41ba
Upload required weights to CUDA
createreadupdate Jun 26, 2026
908c893
Cache CUDA weight uploads per model
createreadupdate Jun 26, 2026
594c11d
Add CUDA quantized matvec kernel
createreadupdate Jun 26, 2026
a0f26b9
Add CUDA RMSNorm kernel
createreadupdate Jun 26, 2026
3fa7254
Add CUDA RoPE kernel
createreadupdate Jun 26, 2026
b95d4a5
Add CUDA attention score kernel
createreadupdate Jun 26, 2026
3a03363
Add CUDA attention softmax kernel
createreadupdate Jun 26, 2026
0e63e49
Add CUDA attention value aggregation kernel
createreadupdate Jun 26, 2026
741151a
Add CUDA FFN SwiGLU path
createreadupdate Jun 26, 2026
1477cc7
Add CUDA output projection path
createreadupdate Jun 26, 2026
5df77d5
Add bounded CUDA logits readback
createreadupdate Jun 26, 2026
2ef64b2
Document GPU sampling boundary
createreadupdate Jun 26, 2026
ee8e2fb
Connect GPU decoder stream contract
createreadupdate Jun 26, 2026
7138bfb
Support native CPU plain text chat
createreadupdate Jun 26, 2026
b70f5db
Expose native GPU decoder blockers
createreadupdate Jun 26, 2026
cbc7fc1
Add native GPU embedding row loader
createreadupdate Jun 26, 2026
6df4f8a
Add native GPU device vector ops
createreadupdate Jun 26, 2026
7b49552
Add native GPU device KV cache
createreadupdate Jun 26, 2026
5c495c8
Add native GPU decoder graph executor
createreadupdate Jun 26, 2026
704c167
Add native GPU prompt loop admission
createreadupdate Jun 26, 2026
7accb3f
Add native GPU graph result envelope
createreadupdate Jun 26, 2026
3971d17
Add native GPU graph execution plan
createreadupdate Jun 26, 2026
0a259e3
Add native GPU embedding graph execution
createreadupdate Jun 26, 2026
5a9381c
Add native GPU RMSNorm graph execution
createreadupdate Jun 26, 2026
feb0e76
Add native GPU linear graph execution
createreadupdate Jun 26, 2026
9833ff4
Add native GPU slice graph execution
createreadupdate Jun 26, 2026
8192bef
Add native GPU RoPE graph execution
createreadupdate Jun 26, 2026
ea2ca24
Add native GPU K/V head preparation
createreadupdate Jun 26, 2026
9de61de
Add native GPU KV cache write graph execution
createreadupdate Jun 26, 2026
f99e0c4
Add native GPU KV attention graph execution
createreadupdate Jun 26, 2026
0fa3bfa
Retain native GPU attention context for residual bridge
createreadupdate Jun 26, 2026
e0ea23b
Prepare native GPU attention stack slot
createreadupdate Jun 26, 2026
b684e96
Execute native GPU attention heads
createreadupdate Jun 26, 2026
e7abe7f
Return native GPU attention stack
createreadupdate Jun 26, 2026
9122071
Execute native GPU attention output projection
createreadupdate Jun 26, 2026
7f89860
Execute native GPU attention residual add
createreadupdate Jun 26, 2026
28a08e1
Execute native GPU FFN RMSNorm
createreadupdate Jun 26, 2026
f115c4f
Execute native GPU FFN gate up projections
createreadupdate Jun 26, 2026
29c49db
Execute native GPU FFN SwiGLU
createreadupdate Jun 26, 2026
b6e0a85
Execute native GPU FFN down projection
createreadupdate Jun 26, 2026
2113941
Execute native GPU FFN output residual
createreadupdate Jun 26, 2026
545d778
Execute native GPU final RMSNorm
createreadupdate Jun 26, 2026
af41d06
Execute native GPU logits projection
createreadupdate Jun 26, 2026
299f87a
Return native GPU bounded logits candidates
createreadupdate Jun 26, 2026
f2e3b15
Consume native GPU bounded logits in prompt loop
createreadupdate Jun 26, 2026
24d036c
Continue native GPU prompt generation
createreadupdate Jun 26, 2026
84ebd63
Enable native GPU OpenAI chat completions
createreadupdate Jun 26, 2026
7874937
Advertise native CPU OpenAI chat streaming
createreadupdate Jun 26, 2026
2f98404
Enable native GPU OpenAI chat streaming
createreadupdate Jun 26, 2026
5e99f03
Reject OpenAI tool call requests
createreadupdate Jun 26, 2026
891ed3c
Report precise OpenAI tool call errors
createreadupdate Jun 26, 2026
43c7293
Expose OpenAI model client capabilities
createreadupdate Jun 26, 2026
9a35cfc
Add GPU runtime status config check
createreadupdate Jun 26, 2026
89d331e
Add GPU model metadata contract check
createreadupdate Jun 26, 2026
1a50b1d
Add CPU decoder logits contract check
createreadupdate Jun 26, 2026
9952a10
Add King-only hello-world contract check
createreadupdate Jun 26, 2026
933f9ff
Add OpenAI native streaming E2E check
createreadupdate Jun 26, 2026
c769907
Add Gemma4 12B GPU guardrail check
createreadupdate Jun 26, 2026
16615dd
Add GPU thermal refusal check
createreadupdate Jun 26, 2026
717ac57
Add GPU profile no CPU fallback check
createreadupdate Jun 26, 2026
ff3197c
Add GPU readiness runbook
createreadupdate Jun 26, 2026
f853a6c
Add local inference status CLI
createreadupdate Jun 26, 2026
9078a8e
Add inference router runtime state logs
createreadupdate Jun 26, 2026
e9745ba
Add LLM cache disk floor contract
createreadupdate Jun 26, 2026
11df0cd
Keep inference memory cache opt-in
createreadupdate Jun 26, 2026
67bab98
Add native inference router and demo chat
createreadupdate Jun 30, 2026
5ada9ec
Document local inference chat setup
createreadupdate Jun 30, 2026
c436a6d
Fix deterministic OpenAI router mini-ops
createreadupdate Jun 30, 2026
91be414
Add native inference runtime profile config
createreadupdate Jun 30, 2026
1d3b586
Harden native inference stream lifecycle
createreadupdate Jun 30, 2026
9ba5c3f
Expose OpenAI inference runtime diagnostics
createreadupdate Jun 30, 2026
3fbd268
Harden CUDA decoder graph execution
createreadupdate Jun 30, 2026
904b7b7
Add native inference verification tooling
createreadupdate Jun 30, 2026
6a20269
Expose native decoder runtime truth
createreadupdate Jun 30, 2026
ed16f80
Harden inference CPU GPU profile selection
createreadupdate Jun 30, 2026
afe0b6c
Centralize OpenAI router prompt assembly
createreadupdate Jun 30, 2026
4b1d7ac
Move deterministic mini ops into inference runtime
createreadupdate Jun 30, 2026
c2bea54
Sanitize OpenAI tool fields in router
createreadupdate Jun 30, 2026
c958d2c
Add MCP-backed inference mini op bridge
createreadupdate Jun 30, 2026
25baed9
Expose tokenizer health and stop trimming
createreadupdate Jun 30, 2026
2f04c68
Add layer zero decode graph diagnostics
createreadupdate Jun 30, 2026
ff5bdc7
Harden GPU decode graph execution plan
createreadupdate Jun 30, 2026
8c1e3a1
Harden GPU KV cache bounds
createreadupdate Jun 30, 2026
b19ef49
Stabilize sequential GPU prefill window
createreadupdate Jun 30, 2026
ad42fc6
Report batch prefill as disabled by default
createreadupdate Jun 30, 2026
7cc4691
Classify CUDA attention numeric mismatches
createreadupdate Jun 30, 2026
5fa110b
Classify CUDA FFN numeric compares
createreadupdate Jun 30, 2026
1c802e6
Stabilize CUDA logits sampler contracts
createreadupdate Jun 30, 2026
fb3e685
Stream chat deltas when tools are present
createreadupdate Jun 30, 2026
ded2bce
Unify OpenAI completion usage builders
createreadupdate Jun 30, 2026
729f874
Support JSON object response format
createreadupdate Jun 30, 2026
deaf41a
Unify inference error taxonomy payloads
createreadupdate Jun 30, 2026
f5204ef
Close inference streams on timeout
createreadupdate Jun 30, 2026
e45608e
Expose GPU guardrail stream status
createreadupdate Jun 30, 2026
96ca6ef
Expose inference hotpath metrics
createreadupdate Jun 30, 2026
f6641c7
Track bounded logits readback savings
createreadupdate Jun 30, 2026
13fba96
Reduce logits readback hotpath overhead
createreadupdate Jun 30, 2026
80ed237
Forbid GPU profile CPU fallback
createreadupdate Jun 30, 2026
2a2e207
Bind local GPU profile to 12B model
createreadupdate Jun 30, 2026
7e4fdca
Make GPU system RAM offload explicit
createreadupdate Jun 30, 2026
2fce541
Expose configured inference models through OpenAI list
createreadupdate Jun 30, 2026
3ca8534
Harden OpenAI router streaming preflight
createreadupdate Jun 30, 2026
89ec352
Prepare local inference runner cache
createreadupdate Jun 30, 2026
02ce0bc
Expand local golden prompt probe
createreadupdate Jun 30, 2026
9451e79
Add deterministic inference prompt pack
createreadupdate Jun 30, 2026
d33cffe
Record sanitized inference probe results
createreadupdate Jun 30, 2026
14305b9
Add local coder fine-tune examples
createreadupdate Jun 30, 2026
2f3f425
Keep inference memory optional by default
createreadupdate Jun 30, 2026
67d1be4
Disable LLM cache below disk floor
createreadupdate Jun 30, 2026
294fcfa
Add structured mini language runtime
createreadupdate Jun 30, 2026
580d78a
Move deterministic inference path into engine
createreadupdate Jun 30, 2026
5989567
Split CUDA decoder graph executor includes
createreadupdate Jun 30, 2026
177dc98
Fix inference stub parity and portable rope diagnostics
createreadupdate Jun 30, 2026
0495ebd
Isolate Semantic DNS state in release gates
createreadupdate Jun 30, 2026
8e2cadc
Stabilize profile smoke PHP toolchain and DNS state
createreadupdate Jun 30, 2026
965cb6a
Relax profile toolchain diagnostics
createreadupdate Jun 30, 2026
091c0a0
Make profile PHP diagnostics non-fatal
createreadupdate Jun 30, 2026
05538fd
Fix shard one inference and DNS contracts
createreadupdate Jun 30, 2026
7122465
Fix native inference tokenizer and KV context
createreadupdate Jul 1, 2026
a891426
Refresh Semantic DNS heartbeat on idempotent registration
createreadupdate Jul 1, 2026
1eeb466
Merge main into release v1.0.10-beta
createreadupdate Jul 1, 2026
a1cbffd
Fix CodeQL CUDA weight name check
createreadupdate Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.git
.github
dist/
dist/*
!dist/docker-packages/
!dist/docker-packages/**
compat-artifacts/
.cache/
benchmarks/results
Expand Down
28 changes: 25 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ jobs:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
- runner: king
arch-label: linux-amd64
local-lsquic-cache-dir: /opt/king/cache/lsquic/runtime
- runner: ubuntu-24.04-arm
arch-label: linux-arm64
local-lsquic-cache-dir: ""

steps:
- name: Checkout repository
Expand All @@ -74,8 +76,17 @@ jobs:
- name: Install system dependencies
run: bash ./infra/scripts/install-ci-system-dependencies.sh

- name: Restore local pinned LSQUIC runtime cache
id: restore-local-lsquic-runtime-cache
if: matrix.local-lsquic-cache-dir != ''
env:
KING_CI_LOCAL_LSQUIC_CACHE_DIR: ${{ matrix.local-lsquic-cache-dir }}
KING_LSQUIC_RUNTIME_PREFIX: ${{ github.workspace }}/.cache/king/lsquic/runtime/prefix
run: bash ./infra/scripts/local-lsquic-runtime-cache.sh restore --github-output "${GITHUB_OUTPUT}"

- name: Restore pinned LSQUIC runtime cache
id: restore-lsquic-runtime-cache
if: steps.restore-local-lsquic-runtime-cache.outputs.cache-hit != 'true'
uses: actions/cache/restore@v5
with:
path: .cache/king/lsquic/runtime/prefix
Expand All @@ -86,8 +97,7 @@ jobs:
env:
KING_LSQUIC_RUNTIME_PREFIX: ${{ github.workspace }}/.cache/king/lsquic/runtime/prefix
run: |
if [[ "${{ steps.restore-lsquic-runtime-cache.outputs.cache-hit }}" == "true" ]] \
&& bash ./infra/scripts/build-lsquic-runtime.sh --verify-current; then
if bash ./infra/scripts/build-lsquic-runtime.sh --verify-current; then
echo "cache-current=true" >> "${GITHUB_OUTPUT}"
exit 0
fi
Expand All @@ -100,6 +110,13 @@ jobs:
KING_LSQUIC_RUNTIME_PREFIX: ${{ github.workspace }}/.cache/king/lsquic/runtime/prefix
run: bash ./infra/scripts/build-lsquic-runtime.sh

- name: Save local pinned LSQUIC runtime cache
if: matrix.local-lsquic-cache-dir != '' && steps.restore-local-lsquic-runtime-cache.outputs.cache-hit != 'true'
env:
KING_CI_LOCAL_LSQUIC_CACHE_DIR: ${{ matrix.local-lsquic-cache-dir }}
KING_LSQUIC_RUNTIME_PREFIX: ${{ github.workspace }}/.cache/king/lsquic/runtime/prefix
run: bash ./infra/scripts/local-lsquic-runtime-cache.sh save

- name: Save pinned LSQUIC runtime cache
if: steps.verify-lsquic-runtime-cache.outputs.cache-current != 'true'
uses: actions/cache/save@v5
Expand Down Expand Up @@ -187,6 +204,11 @@ jobs:
working-directory: extension
run: ../infra/scripts/check-stub-parity.sh

- name: Run model-optional inference verification matrix
if: matrix.shard-index == 1
working-directory: extension
run: ../bin/king-inference-verify-matrix --json

- name: Run canonical PHPT suite
working-directory: extension
env:
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/local-inference-runner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: King Local Inference Runner

on:
push:
branches:
- '**'
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
workflow_dispatch:

concurrency:
group: king-local-inference-runner-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.event.pull_request.head.ref || github.ref_name }}
cancel-in-progress: true

permissions:
contents: read

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
KING_CI_LOCAL_INFERENCE_MODEL_DIR: /opt/king/cache/inference-models
KING_CI_LOCAL_LSQUIC_CACHE_DIR: /opt/king/cache/lsquic/runtime

jobs:
local-inference-runner:
name: Local inference cache readiness
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: king
timeout-minutes: 10

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Resolve local GGUF inference model cache
id: inference-model
run: bash ./infra/scripts/local-inference-model-cache.sh resolve --require --github-output "${GITHUB_OUTPUT}"

- name: Export local inference model path
env:
MODEL_PRESENT: ${{ steps.inference-model.outputs.model-present }}
MODEL_PATH: ${{ steps.inference-model.outputs.model-realpath }}
run: |
test "${MODEL_PRESENT}" = "true"
test -r "${MODEL_PATH}"
printf 'KING_INFERENCE_TEST_MODEL_PATH=%s\n' "${MODEL_PATH}" >> "${GITHUB_ENV}"
printf 'KING_INFERENCE_CPU_TEST_MODEL_PATH=%s\n' "${MODEL_PATH}" >> "${GITHUB_ENV}"

- name: Verify heavy native dependency cache hook
run: |
test -x ./infra/scripts/local-lsquic-runtime-cache.sh
test -n "${KING_CI_LOCAL_LSQUIC_CACHE_DIR}"

- name: Verify no public inference port is exposed
run: bash ./infra/scripts/check-inference-port-exposure.sh --ports 8080,18129
55 changes: 49 additions & 6 deletions .github/workflows/release-merge-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
REGISTRY: ghcr.io
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
PHP_BASE_MAX_AGE_DAYS: "14"
KING_CI_LOCAL_DOCKER_BUILDX_CACHE_DIR: /opt/king/cache/docker/buildx

jobs:
resolve-release-merge:
Expand Down Expand Up @@ -158,6 +159,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Resolve Docker Buildx cache
id: base-buildx-cache
run: |
bash ./infra/scripts/resolve-docker-buildx-cache.sh \
--scope "php-base-${{ matrix.php-version }}" \
--github-output "${GITHUB_OUTPUT}"

- name: Log in to Container Registry
uses: docker/login-action@v4
with:
Expand Down Expand Up @@ -251,11 +259,18 @@ jobs:
push: true
tags: ${{ steps.meta-base.outputs.ref }}
labels: ${{ steps.meta-base.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: ${{ steps.base-buildx-cache.outputs.cache-from }}
cache-to: ${{ steps.base-buildx-cache.outputs.cache-to }}
build-args: |
PHP_VERSION=${{ matrix.php-version }}

- name: Commit local Docker Buildx cache
if: steps.decide-base.outputs.rebuild == 'true' && steps.base-buildx-cache.outputs.use-local-cache == 'true'
run: |
bash ./infra/scripts/commit-docker-buildx-cache.sh \
--cache-dir "${{ steps.base-buildx-cache.outputs.local-cache-dir }}" \
--next-dir "${{ steps.base-buildx-cache.outputs.local-cache-next-dir }}"

build-release-packages:
name: Build release artifacts for ${{ matrix.php-version }} / ${{ matrix.arch-label }}
needs:
Expand Down Expand Up @@ -722,6 +737,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Resolve Docker Buildx cache
id: dockerhub-buildx-cache
run: |
bash ./infra/scripts/resolve-docker-buildx-cache.sh \
--scope "dockerhub-runtime-php8.5" \
--github-output "${GITHUB_OUTPUT}"

- name: Log in to Docker Hub
uses: docker/login-action@v4
with:
Expand All @@ -744,14 +766,21 @@ jobs:
push: true
tags: ${{ steps.meta-dockerhub.outputs.tags }}
labels: ${{ steps.meta-dockerhub.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: ${{ steps.dockerhub-buildx-cache.outputs.cache-from }}
cache-to: ${{ steps.dockerhub-buildx-cache.outputs.cache-to }}
build-args: |
PHP_VERSION=8.5
PHP_BASE_IMAGE=${{ steps.meta-dockerhub.outputs.php_base_image }}
BUILD_DATE=${{ steps.meta-dockerhub.outputs.created_at }}
VCS_REF=${{ needs.resolve-release-merge.outputs.release-commit }}

- name: Commit local Docker Buildx cache
if: steps.dockerhub-buildx-cache.outputs.use-local-cache == 'true'
run: |
bash ./infra/scripts/commit-docker-buildx-cache.sh \
--cache-dir "${{ steps.dockerhub-buildx-cache.outputs.local-cache-dir }}" \
--next-dir "${{ steps.dockerhub-buildx-cache.outputs.local-cache-next-dir }}"

- name: Generate Docker Hub runtime CVE inventory
id: dockerhub-cve-inventory
run: |
Expand Down Expand Up @@ -867,6 +896,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Resolve Docker Buildx cache
id: runtime-buildx-cache
run: |
bash ./infra/scripts/resolve-docker-buildx-cache.sh \
--scope "runtime-php${{ matrix.php-version }}" \
--github-output "${GITHUB_OUTPUT}"

- name: Log in to Container Registry
uses: docker/login-action@v4
with:
Expand All @@ -883,10 +919,17 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: ${{ steps.runtime-buildx-cache.outputs.cache-from }}
cache-to: ${{ steps.runtime-buildx-cache.outputs.cache-to }}
build-args: |
PHP_VERSION=${{ matrix.php-version }}
PHP_BASE_IMAGE=${{ steps.meta.outputs.php_base_image }}
BUILD_DATE=${{ steps.meta.outputs.created_at }}
VCS_REF=${{ needs.resolve-release-merge.outputs.release-commit }}

- name: Commit local Docker Buildx cache
if: steps.runtime-buildx-cache.outputs.use-local-cache == 'true'
run: |
bash ./infra/scripts/commit-docker-buildx-cache.sh \
--cache-dir "${{ steps.runtime-buildx-cache.outputs.local-cache-dir }}" \
--next-dir "${{ steps.runtime-buildx-cache.outputs.local-cache-next-dir }}"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ libcurl
quiche
llama-fork/
node_modules
.venv/
.cargo/

# Archived source snapshots
Expand Down Expand Up @@ -39,6 +40,7 @@ compat-artifacts/
dist/
!packages/iibin/dist/
!packages/iibin/dist/**
var/
.cache/
.vite/
.codex
Expand All @@ -47,6 +49,9 @@ dist/
.env.local
*.env.local

# Local planning notes that are not part of the public docs set.
docs/future-plan.md

# Model weights MUST NEVER be checked in (they are large and provenance
# belongs on a model registry / object store, not in git). Catch-all
# patterns repo-wide — if you actually need a tiny test fixture that
Expand Down
Loading
Loading