Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 13 additions & 5 deletions .agents/notes/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ Keep this updated whenever a decision is made.
out of the heavy release path.

## D16 - Standalone repo + submodule; natives via upstream release download (supersedes D15's CI shape)
- Repo split: the binding now lives in its own repo, `sergey-v9/ladybug-dotnet` (temporary home; to be
transferred to the LadybugDB org if the maintainers adopt it). It is developed as a git submodule
- Repo split: the binding lives in its own repo, `LadybugDB/ladybug-dotnet` (adopted into the LadybugDB
org from its initial personal home). It is developed as a git submodule
mounted at `tools/csharp_api` in `LadybugDB/ladybug`, exactly mirroring `tools/rust_api` ->
`ladybug-rust` and `tools/java_api` -> `ladybug-java` (see the monorepo `.gitmodules`). The repo
root == the old `tools/csharp_api/` contents (so `src/`, `test/`, `.github/`, `.agents/` sit at the
Expand All @@ -120,12 +120,20 @@ Keep this updated whenever a decision is made.
build/test/pack; path filters now repo-relative) and `csharp-release.yml` ->
`.github/workflows/release.yml` (download-natives -> stage -> linux-x64 gate -> pack -> assert ->
OIDC publish). Release tag is now `v*` (not `csharp-v*`); `v1.2.3` -> package version `1.2.3`.
- Trusted publishing now targets this repo: nuget.org policy owner=`sergey-v9`, repo=`ladybug-dotnet`,
workflow=`release.yml`, env=`release`. Caveat: publishing the official `LadybugDB` package id requires
id ownership - a personal-repo publish is a dry run until the repo/package move to the org.
- Trusted publishing now targets this repo: nuget.org policy owner=`LadybugDB`, repo=`ladybug-dotnet`,
workflow=`release.yml`, env=`release`. The repo now lives in the LadybugDB org; publishing the official
`LadybugDB` package id still needs the nuget.org policy wired up and package-id ownership on that account.
- The staging/`cp -L`/RID-mapping/package-content-assertion logic and the `LADYBUG_REQUIRE_NATIVE=1`
gate from D15 all carry over unchanged; only the source of the native artifacts differs.

## D17 - Adopted into the LadybugDB org; native CI matrix
- The repo was adopted into the LadybugDB org as `LadybugDB/ladybug-dotnet` (no longer a personal repo).
The submodule `origin` and the monorepo `.gitmodules` URL were repointed to it; the trusted-publishing
policy owner is now `LadybugDB` and `RepositoryUrl` points at the org repo.
- `ci.yml` gained a `native-test` matrix (linux-x64 + win-x64) that downloads the prebuilt `liblbug-*`
for `ENGINE_VERSION` (now pinned to `v0.17.0`) and runs the full suite with `LADYBUG_REQUIRE_NATIVE=1`,
so native round-trips run on every push - not only in the release gate.

## Open (decide later)
- Timestamp representation: `DateTime` (UTC) for non-tz precisions vs `DateTimeOffset` for `TIMESTAMP_TZ` (Phase 2).
- Whether to expose write-side construction of unsigned / `UNION` / `ARRAY` values and full `INTERVAL` (months/days).
Expand Down
37 changes: 20 additions & 17 deletions .agents/notes/HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Current state, how to build/test, and immediate next steps. Keep this current whenever work pauses.

## Current state
- Now a standalone repo: `sergey-v9/ladybug-dotnet` (temporary home; intended to move to the LadybugDB
org). Developed as the `tools/csharp_api` submodule of `LadybugDB/ladybug` (mirrors `tools/rust_api`,
`tools/java_api`). The submodule is currently wired in the monorepo LOCALLY ONLY (not pushed upstream).
- Standalone repo in the LadybugDB org: `LadybugDB/ladybug-dotnet`. Developed as the `tools/csharp_api`
submodule of `LadybugDB/ladybug` (mirrors `tools/rust_api`, `tools/java_api`). The submodule is wired
in the monorepo LOCALLY ONLY here (the monorepo gitlink is not pushed upstream yet).
- Phases 0-3 implemented. The solution builds for BOTH target frameworks (`net10.0` + `netstandard2.0`),
and `dotnet pack` produces a valid package.
- END-TO-END VALIDATED on Windows x64: native `lbug_shared.dll` built locally with MSVC + Ninja and
Expand Down Expand Up @@ -94,9 +94,11 @@ tools/csharp_api/

## CI / CD (GitHub Actions, in the standalone repo)
Two workflows at the repo root. They do NOT build the engine - natives come from upstream releases.
- `.github/workflows/ci.yml` - PR/push validation. Builds both TFMs, runs the managed + ABI suite
(native round-trips skip without a native lib), and a `dotnet pack` smoke check. Path-filtered to
`src/**`, `test/**`, `**/*.props`, `LadybugDB.slnx`.
- `.github/workflows/ci.yml` - PR/push validation. The `build-test` job builds both TFMs, runs the
managed + ABI suite (native round-trips skip without a native lib), and a `dotnet pack` smoke check.
A `native-test` matrix (linux-x64 + win-x64) then downloads the prebuilt `liblbug-*` for `ENGINE_VERSION`
from `LadybugDB/ladybug`, stages it, and re-runs the suite with `LADYBUG_REQUIRE_NATIVE=1` (no skips).
Path-filtered to `src/**`, `test/**`, `**/*.props`, `LadybugDB.slnx`.
- `.github/workflows/release.yml` - the release pipeline. Two jobs:
1. `pack`: `gh release download "$ENGINE_VERSION" --repo LadybugDB/ladybug` pulls the prebuilt
`liblbug-*` assets for all 5 RIDs, `cp -L`s each into `lib/runtimes/<rid>/native/`
Expand All @@ -116,21 +118,22 @@ git push origin v0.1.0
`workflow_dispatch` (with a `version` input) builds + packs + uploads the artifact WITHOUT publishing -
use it to dry-run the multi-RID build before tagging.

### One-time setup before the first publish (USER ACTION)
### One-time setup before the first publish (MAINTAINER ACTION)
- nuget.org -> Account -> Trusted Publishing -> Add policy:
owner=`sergey-v9`, repo=`ladybug-dotnet`, workflow file=`release.yml`, environment=`release`.
- Repo Settings -> Environments -> `release`: add secret `NUGET_USER` = your nuget.org PROFILE name
(not email). Optionally add required reviewers as an approval gate.
- The official `LadybugDB` package id requires ownership; from a personal repo treat the publish as a
dry run until the repo/package id move to the LadybugDB org (then re-point the policy + RepositoryUrl).
owner=`LadybugDB`, repo=`ladybug-dotnet`, workflow file=`release.yml`, environment=`release`.
- Repo Settings -> Environments -> `release`: add secret `NUGET_USER` = the nuget.org PROFILE name
(not email) that owns/co-owns the package id. Optionally add required reviewers as an approval gate.
- The `LadybugDB` package id must be owned (or reserved) by that nuget.org account before the first real
push; until then, use `workflow_dispatch` / local `dotnet pack` as a dry run.
- Before the first real publish, dry-run: `dotnet pack -c Release -o ./artifacts` (or the dispatch run).

## Next steps
1. Confirm `LadybugDB/ladybug` has a release carrying the `liblbug-*` assets and set `ENGINE_VERSION`
to it, then run `release.yml` via `workflow_dispatch` once to confirm the multi-RID natives download,
the package assembles, and the linux-x64 gate passes (proven on win-x64 locally so far).
1. Confirm the pinned `ENGINE_VERSION` (`v0.17.0`) release of `LadybugDB/ladybug` actually carries the
`liblbug-*` assets for all 5 RIDs, then run `release.yml` via `workflow_dispatch` once to confirm the
multi-RID natives download, the package assembles, and the linux-x64 gate passes (proven on win-x64
locally; the new `ci.yml` native matrix now also exercises linux-x64 + win-x64 on every push).
2. Complete the nuget.org trusted-publishing policy + `release` environment, then tag `v*`.
3. If/when maintainers adopt it: transfer the repo to the LadybugDB org, repoint `.gitmodules` upstream,
and update the trusted-publishing policy + `RepositoryUrl`.
3. Reserve/own the `LadybugDB` package id on nuget.org under the publishing account (the repo already
lives in the LadybugDB org).
4. Phase 3 (remaining): expand the suite to mirror the Java + C API tests over `dataset/tinysnb`.
5. Phase 5 (optional): Native AOT validation, Arrow C Data interface, observability.
18 changes: 10 additions & 8 deletions .agents/notes/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Legend: [x] done and verified here. As of 2026-05-29 the native `lbug_shared.dll
(MSVC + Ninja, win-x64) and the full suite passes end-to-end (28/28, 0 skipped), so the previous
"[~] awaiting native validation" markers are now resolved for win-x64.

As of 2026-05-30 the binding was split into the standalone `sergey-v9/ladybug-dotnet` repo and wired
back into the monorepo as the `tools/csharp_api` submodule (local only). The suite still passes
28/28 from the submodule, building `lbug_shared` against the parent engine via `../../`.
As of 2026-05-30 the binding was split into a standalone repo - now adopted into the LadybugDB org as
`LadybugDB/ladybug-dotnet` - and wired back into the monorepo as the `tools/csharp_api` submodule (local
only). The suite still passes 28/28 from the submodule, building `lbug_shared` against the parent engine
via `../../`.

## Phase 0 - Scaffold [x]
- [x] `tools/csharp_api/` layout
Expand Down Expand Up @@ -44,14 +45,15 @@ back into the monorepo as the `tools/csharp_api` submodule (local only). The sui
- [x] win-x64 native lib wired into `lib/runtimes/win-x64/native/` and loaded by the tests
- [x] Package contains the win-x64 native lib at `runtimes/win-x64/native/lbug_shared.dll`;
consume-test from a local feed runs queries end-to-end (native asset flows to consumer output)
- [x] Repo split: standalone `sergey-v9/ladybug-dotnet`, wired as the `tools/csharp_api` submodule (local)
- [x] Repo split: standalone `LadybugDB/ladybug-dotnet` (in the LadybugDB org), wired as the `tools/csharp_api` submodule (local)
- [x] Multi-RID release workflow (`.github/workflows/release.yml`, tag `v*`): downloads prebuilt
`liblbug-*` for all 5 RIDs (win-x64, linux-x64/arm64, osx-x64/arm64) from `LadybugDB/ladybug`
releases (pinned `ENGINE_VERSION`), stages -> linux-x64 gate -> packs -> asserts contents -> OIDC publish
- [x] Lightweight `.github/workflows/ci.yml` (both TFMs + managed/ABI tests + pack smoke check) on PR/push
- [ ] One-time nuget.org trusted-publishing policy + `release` environment / `NUGET_USER` secret (user action)
- [ ] First green CI run (release workflow needs a `LadybugDB/ladybug` release carrying `liblbug-*`; confirm `ENGINE_VERSION`)
- [ ] Package-id ownership / repo transfer to the LadybugDB org before a real publish
- [x] `.github/workflows/ci.yml` on PR/push: managed `build-test` (both TFMs + ABI tests + pack smoke) plus a `native-test` matrix (linux-x64 + win-x64) running the suite against downloaded natives
- [x] Repo adopted into the LadybugDB org as `LadybugDB/ladybug-dotnet`
- [ ] One-time nuget.org trusted-publishing policy + `release` environment / `NUGET_USER` secret (maintainer action)
- [ ] First green release run (`release.yml` needs a `LadybugDB/ladybug` release carrying `liblbug-*`; confirm `ENGINE_VERSION` = `v0.17.0`)
- [ ] `LadybugDB` package-id ownership/reservation on nuget.org before a real publish
- [ ] Optional: win-arm64 / linux-musl RIDs (not produced by the upstream precompiled workflow today)

## Phase 5 (optional) - Extras [pending]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name: Release
# - manual `workflow_dispatch` -> build, test, and pack only (artifact uploaded; no publish)
#
# One-time setup required before the first publish (see notes/HANDOFF.md):
# - nuget.org trusted publishing policy: owner=sergey-v9, repo=ladybug-dotnet,
# - nuget.org trusted publishing policy: owner=LadybugDB, repo=ladybug-dotnet,
# workflow file=release.yml, environment=release
# - GitHub environment `release` with secret NUGET_USER = your nuget.org profile name (not email)

Expand Down
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2026 Sergey Vershinin
Copyright (c) 2026 Ladybug Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion nuget/nuget-package.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageTags>graph;graph-database;database;cypher;embedded;ladybug;olap;analytics</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/ladybugdb/ladybug</PackageProjectUrl>
<RepositoryUrl>https://github.com/sergey-v9/ladybug-dotnet</RepositoryUrl>
<RepositoryUrl>https://github.com/LadybugDB/ladybug-dotnet</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
Loading