Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c3de9c1
feat(bssci): BSSCI 1.1 version negotiation and full unsigned EUI-64 r…
wirelesstim Jul 22, 2026
8f85224
fix(db): complete the BYTEA EUI migration across queries, archives an…
wirelesstim Jul 22, 2026
7682b73
fix(bssci): safe session resume and correct operation lifecycle
wirelesstim Jul 22, 2026
def00b3
feat(bssci): dlRxStatQry correlation and expiry, certificate issuance…
wirelesstim Jul 22, 2026
44771d5
feat(bssci): converge downlink dispatch and make operation order durable
wirelesstim Jul 22, 2026
d8feabe
feat(bssci): end-to-end certificate identity enforcement
wirelesstim Jul 22, 2026
0d4d2ea
refactor(core): repair the SOLID boundary checker and clear its viola…
wirelesstim Jul 22, 2026
8ea4a05
refactor(core): narrow storage contracts and SCACI context threading
wirelesstim Jul 22, 2026
c0ca070
fix(gateway): stop counting client stream teardown as breaker failures
wirelesstim Jul 22, 2026
1d7d971
fix(bssci): sweep pending-op cache on teardown, drop irrecoverable re…
wirelesstim Jul 22, 2026
5bcb322
fix(gateway): admit streams only through a closed circuit breaker
wirelesstim Jul 22, 2026
78bc6ad
fix(bssci,scaci): fail-fast wiring validation and runtime lifecycle g…
wirelesstim Jul 22, 2026
ade13ab
refactor(scaci): rename PersistConnectAsync to PersistResumeAsync, dr…
wirelesstim Jul 22, 2026
712d2a1
ci: run the full KC-Core suite and the KC-DB postgres integration tests
wirelesstim Jul 22, 2026
a578d7e
docs(bssci): annotate sentinel pass-through returns in attach persist…
wirelesstim Jul 22, 2026
4a4bc9f
chore(release): stamp manifest at 7b00145 for the Codex-review remedi…
wirelesstim Jul 22, 2026
c663a0c
fix(bssci): reject resume before conRsp when persisted work cannot be…
wirelesstim Jul 22, 2026
68c6e79
fix(gateway): stream results recorded only while the breaker is closed
wirelesstim Jul 22, 2026
b7de057
fix(bssci): commit lifecycle state only after successful validation
wirelesstim Jul 22, 2026
eab22c4
fix(bssci): wrap attach-transaction errors instead of annotating bare…
wirelesstim Jul 22, 2026
0164fd6
ci: full KC-Core suite, branch-push checks, images gated on the postg…
wirelesstim Jul 22, 2026
e6c0e17
chore(release): stamp manifest at 02c1841 for Codex round 2
wirelesstim Jul 22, 2026
c9efdb9
ci: provide the migrated env database the schema-ownership tests require
wirelesstim Jul 22, 2026
13c2dca
chore(release): stamp manifest at c9efdb9
wirelesstim Jul 22, 2026
e3ea3c3
refactor: split CodeFactor-flagged complex methods into focused helpers
wirelesstim Jul 23, 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
  •  
  •  
  •  
65 changes: 56 additions & 9 deletions .github/workflows/pipeline-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
workflow_dispatch:
push:
branches:
- main
- dev
- "**"
tags-ignore:
- "v*"
pull_request:
Expand Down Expand Up @@ -73,10 +72,10 @@ jobs:
go-version-file: go.work
- name: Run Go tests (unit only, no DB/infra)
run: |
echo "::group::Testing KC-Core (skip bssci integration)"
(cd KC-Core && go test -short -timeout 3m $(go list ./... | grep -v /pkg/bssci$))
echo "::group::Testing KC-Core (full suite)"
(cd KC-Core && go test -timeout 10m ./...)
echo "::endgroup::"
echo "::group::Testing KC-DB (skip postgres integration)"
echo "::group::Testing KC-DB (postgres suite runs in test-postgres)"
(cd KC-DB && go test -short -timeout 3m $(go list ./... | grep -v /postgres))
echo "::endgroup::"
for mod in KC-Gateway KC-Identity KC-MQTT pkg; do
Expand All @@ -85,8 +84,53 @@ jobs:
echo "::endgroup::"
done

# The KC-DB postgres suite runs against real testcontainers-managed
# PostgreSQL instances, plus a migrated service database for the
# env-DB-backed schema tests (SetupEnvDBOrSkip fail-fasts when CI=true).
# It takes ~15 minutes and gates image publication.
test-postgres:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17.5
env:
POSTGRES_PASSWORD: changeme
POSTGRES_USER: kilocenter
POSTGRES_DB: kilocenter
ports:
- 5433:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DB_HOST: localhost
DB_PORT: 5433
DB_NAME: kilocenter
DB_USER: kilocenter
DB_PASSWORD: changeme
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.work
- name: Install golang-migrate
run: |
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Run database migrations
run: |
migrate -path KC-DB/migrations \
-database "postgres://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME?sslmode=disable" \
up
- name: Run KC-DB postgres integration tests
run: |
(cd KC-DB && go test -timeout 25m ./storage/postgres/...)

build-kc-core:
needs: [generate-version, lint, test]
needs: [generate-version, lint, test, test-postgres]
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -107,7 +151,8 @@ jobs:
tags: ${{ needs.generate-version.outputs.registry }}/kc-core:${{ needs.generate-version.outputs.version }}

build-kc-gateway:
needs: [generate-version, lint, test]
needs: [generate-version, lint, test, test-postgres]
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -128,7 +173,8 @@ jobs:
tags: ${{ needs.generate-version.outputs.registry }}/kc-gateway:${{ needs.generate-version.outputs.version }}

build-kc-identity:
needs: [generate-version, lint, test]
needs: [generate-version, lint, test, test-postgres]
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -149,7 +195,8 @@ jobs:
tags: ${{ needs.generate-version.outputs.registry }}/kc-identity:${{ needs.generate-version.outputs.version }}

build-kc-web:
needs: [generate-version, lint, test]
needs: [generate-version, lint, test, test-postgres]
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
62 changes: 45 additions & 17 deletions KC-Core/api/gen/kilocenter/v1/core.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions KC-Core/api/proto/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,9 @@ message SendULTransmitResponse {

// Base Station Status Request (BSSCI 3.5)
message BaseStationStatusRequest {
uint64 bs_eui = 1; // Base Station EUI
// Deprecated: uint64 loses precision above 2^53 in browser JavaScript clients; use bs_eui_hex.
uint64 bs_eui = 1 [deprecated = true];
string bs_eui_hex = 2; // Base Station EUI as hex string (browser-safe full-range representation; accepts dashed or non-dashed)
}

message BaseStationStatusResponse {
Expand All @@ -584,7 +586,9 @@ message BaseStationStatusResponse {

// Ping Request (BSSCI §5.4)
message InitiatePingRequest {
uint64 bs_eui = 1; // Base Station EUI
// Deprecated: uint64 loses precision above 2^53 in browser JavaScript clients; use bs_eui_hex.
uint64 bs_eui = 1 [deprecated = true];
string bs_eui_hex = 2; // Base Station EUI as hex string (browser-safe full-range representation; accepts dashed or non-dashed)
}

message InitiatePingResponse {
Expand Down
25 changes: 16 additions & 9 deletions KC-Core/cmd/certgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ import (
"time"
)

// Certificate subject identity shared by the CA and issued certificates.
const (
certSubjectOrganization = "KiloCenter"
certSubjectProvince = "California"
certSubjectLocality = "San Francisco"
)

func main() {
var (
certDir = flag.String("dir", "certs", "Directory to store certificates")
Expand Down Expand Up @@ -151,11 +158,11 @@ func generateCA(validYears int) (*x509.Certificate, *rsa.PrivateKey, error) {
template := x509.Certificate{
SerialNumber: big.NewInt(1),
Subject: pkix.Name{
Organization: []string{"KiloCenter"},
Organization: []string{certSubjectOrganization},
OrganizationalUnit: []string{"MIOTY Certificate Authority"},
Country: []string{"US"},
Province: []string{"California"},
Locality: []string{"San Francisco"},
Province: []string{certSubjectProvince},
Locality: []string{certSubjectLocality},
CommonName: "KiloCenter Root CA",
},
NotBefore: time.Now(),
Expand Down Expand Up @@ -197,11 +204,11 @@ func generateClientCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, clientN
template := x509.Certificate{
SerialNumber: serialNumber,
Subject: pkix.Name{
Organization: []string{"KiloCenter"},
Organization: []string{certSubjectOrganization},
OrganizationalUnit: []string{"MIOTY Base Station"},
Country: []string{"US"},
Province: []string{"California"},
Locality: []string{"San Francisco"},
Province: []string{certSubjectProvince},
Locality: []string{certSubjectLocality},
CommonName: clientName,
},
NotBefore: time.Now(),
Expand Down Expand Up @@ -236,11 +243,11 @@ func generateServerCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, serverN
template := x509.Certificate{
SerialNumber: big.NewInt(2),
Subject: pkix.Name{
Organization: []string{"KiloCenter"},
Organization: []string{certSubjectOrganization},
OrganizationalUnit: []string{"MIOTY Service Center"},
Country: []string{"US"},
Province: []string{"California"},
Locality: []string{"San Francisco"},
Province: []string{certSubjectProvince},
Locality: []string{certSubjectLocality},
CommonName: serverName,
},
NotBefore: time.Now(),
Expand Down
Loading
Loading