Skip to content

Commit 3c6b9ad

Browse files
authored
Merge pull request #97 from kagent-dev/sync/upstream-main-20261023
Sync upstream v1 APIs and sandbox lifecycle fixes
2 parents 91ddf40 + cffc7c7 commit 3c6b9ad

565 files changed

Lines changed: 17847 additions & 16476 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/review-crds/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Your output should be a list of violations conforming to the following JSON form
2929

3030
## Hints
3131

32-
- All CRDs are defined in `pkg/api/v1alpha1`.
32+
- All CRDs are defined in `api/infra/k8s/ate/v1`.
3333

3434
## References
3535
- [Kubernetes API Conventions](references/api-conventions.md)

‎.agents/skills/sync-upstream-main/SKILL.md‎

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ description: Merge agent-substrate/substrate upstream/main into the kagent-dev/s
88
The fork uses merge-based synchronization. Start a branch from current
99
`origin/main`, merge `upstream/main`, and submit that branch to `origin/main`.
1010
Preserve upstream ancestry so later synchronizations contain only new changes.
11-
Do not replay fork commits, squash upstream history, force-push, or push to main.
11+
Each sync PR must contain exactly one sync merge commit on top of `origin/main`,
12+
with all conflict resolutions, integration fixes, and skill updates folded into
13+
it. Preserve the incoming upstream commits; do not squash their history.
14+
Do not replay fork commits or push to main.
1215
Creating a PR requires an explicit request or approval; approval to create it
1316
does not authorize merging it.
1417

@@ -31,9 +34,9 @@ does not authorize merging it.
3134
render check excludes preserved manifests, so passing it alone does not
3235
establish parity. Keep `charts/substrate-crds/templates` synchronized with
3336
generated CRDs.
34-
6. Commit the merge with `git commit -s`. Keep any additional fixes or workflow
35-
documentation in focused signed-off commits. Omit issue and PR references
36-
from commit messages.
37+
6. Commit the merge with `git commit -s`. Fold later fixes and documentation
38+
into that same commit with `git commit --amend -s`; do not leave follow-up
39+
commits on the sync branch. Omit issue and PR references from commit messages.
3740

3841
## Validate and investigate failures
3942

@@ -56,9 +59,18 @@ that the failure is resolved. Report test counts and skips when relevant.
5659

5760
## Publish the PR
5861

59-
Before publishing, fetch both refs again and incorporate any new main changes
60-
with merges. Verify that both recorded main tips are ancestors of the branch,
61-
the diff is intentional, and the worktree is clean. Push only the sync branch.
62+
Before publishing, fetch both refs again. If either main tip changed, rebuild
63+
the single merge from the latest `origin/main` and `upstream/main`, reapplying
64+
and checking the integration fixes. Do not stack additional merge commits.
65+
Verify that `git rev-list --first-parent --count origin/main..HEAD` returns `1`
66+
and HEAD has exactly two parents: `origin/main` first, `upstream/main` second.
67+
Check that the diff is intentional and the worktree is clean.
68+
69+
Push only the sync branch. When amending an already published merge, verify
70+
the remote still matches the last observed PR head and push with an explicit
71+
`--force-with-lease=refs/heads/<sync-branch>:<observed-sha>`. Never force-push
72+
unguarded or overwrite another contributor's changes. Verify that folding
73+
commits preserved the intended tree, and report checks for the new commit SHA.
6274

6375
When PR creation is authorized, open it against `kagent-dev/substrate:main`.
6476
Describe the upstream SHA, material changes, conflict resolutions, required

‎.agents/skills/triage-issues/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Apply all areas that are touched. Most issues need one or two; a few need more.
4848

4949
| Label | Scope |
5050
|---|---|
51-
| `area/api` | User-facing Substrate API (`pkg/proto/ateapipb/`, proto definitions, API semantics, versioning) |
51+
| `area/api` | User-facing Substrate API (`api/ateapi/v1/`, proto definitions, API semantics, versioning) |
5252
| `area/api-machinery` | API server internals: RPC handlers, storage layer, syncer, controllers (`cmd/ateapi/`, `cmd/atecontroller/`) |
5353
| `area/network` | Networking: atenet-router, Envoy, ext_proc, DNS, xDS, ingress (`cmd/atenet/`) |
5454
| `area/node` | Node agent and worker lifecycle: atelet, sandbox launch, OCI, cgroups (`cmd/atelet/`) |

‎.github/SECURITY.md‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,31 @@
66
vulnerabilities.**
77

88
Use [GitHub Private Vulnerability Reporting](https://github.com/agent-substrate/substrate/security/advisories/new)
9-
to report security vulnerabilities privately. Note that this project is not
10-
eligible for the
11-
[Google Open Source Software Vulnerability Rewards Program](https://bughunters.google.com/open-source-security).
9+
to report security vulnerabilities privately. Verify that there is no existing
10+
open GitHub issue covering the problem before creating a report.
1211

13-
Please include:
12+
Please ensure your report is concise and clearly articulates the bug. It should
13+
include:
1414

15+
- How the issue is reachable and exploitable by untrusted code running inside an
16+
actor sandbox. Or a statement that it isn't exploitable from inside an actor
17+
sandbox.
18+
- The security impact resulting from exploitation of the bug.
1519
- The affected component and version or commit SHA.
16-
- Steps to reproduce, or a proof of concept.
17-
- The potential impact, and mitigations if known.
20+
- Detailed steps to fully reproduce, or a proof of concept.
21+
- Mitigations if known.
1822

1923
### When to report
2024

2125
- You found a potential security vulnerability in Agent Substrate.
22-
- You are unsure whether a security issue affects Agent Substrate.
2326
- You found a vulnerability in a project Agent Substrate depends on and it
2427
is exploitable through Agent Substrate. If that project has its own
2528
disclosure process, please report it there as well.
2629

2730
### When not to report
2831

32+
- Theoretical bugs from static analysis without demonstration of an exploitable
33+
security issue.
2934
- You need help securing or tuning a deployment (open a regular issue or
3035
discussion).
3136
- The issue is not security related.
@@ -76,8 +81,7 @@ from most to least severe:
7681
- Sample applications under `demos/` and load-testing harnesses under
7782
`benchmarking/`.
7883
- Documented scope boundaries and future capabilities listed in
79-
[docs/security.md](../docs/security.md) and
80-
[docs/roadmap.md](../docs/roadmap.md) at the time of your report. If you are
84+
[docs/security.md](../docs/security.md) at the time of your report. If you are
8185
unsure whether a finding is covered by a documented limitation, report it
8286
privately anyway and let a maintainer make the call.
8387

‎.golangci-kal.yaml‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Config for kube-api-linter (github.com/kubernetes-sigs/kube-api-linter),
16-
# run by hack/verify/kube-api-linter.sh against the API types in pkg/api/.
16+
# run by hack/verify/kube-api-linter.sh against the API types in api/infra/.
1717
# It is a separate file from .golangci.yaml because the kubeapilinter module
1818
# plugin only exists in the golangci-lint-kube-api-linter binary, not in the
1919
# regular golangci-lint one.
@@ -75,34 +75,34 @@ linters:
7575
rules:
7676
# Pre-existing findings from rules that require Go API changes
7777
# (pointer fields, omitempty/omitzero tags, map-to-list refactors)
78-
# on the existing v1alpha1 types. Each rule names the fields it
78+
# on the existing ate/v1 types. Each rule names the fields it
7979
# excuses, so a field added to one of these types is still checked.
8080
# Fixing these on the existing types is tracked in issue #207.
81-
- path: 'pkg/api/v1alpha1/sandboxconfig_types\.go'
81+
- path: 'api/infra/k8s/ate/v1/sandboxconfig_types\.go'
8282
text: '^requiredfields: .*\bAssetFile\.(SHA256|URL)\b'
83-
- path: 'pkg/api/v1alpha1/sandboxconfig_types\.go'
83+
- path: 'api/infra/k8s/ate/v1/sandboxconfig_types\.go'
8484
text: '^(optionalfields|requiredfields): .*\bSandboxConfigSpec\.SandboxClass\b'
85-
- path: 'pkg/api/v1alpha1/sandboxconfig_types\.go'
85+
- path: 'api/infra/k8s/ate/v1/sandboxconfig_types\.go'
8686
text: '^(nomaps|optionalfields): .*\bSandboxVersionConfig\.Assets\b'
87-
- path: 'pkg/api/v1alpha1/sandboxconfig_types\.go'
87+
- path: 'api/infra/k8s/ate/v1/sandboxconfig_types\.go'
8888
text: '^(nonpointerstructs|requiredfields): .*\bSandboxConfig\.Spec\b'
89-
- path: 'pkg/api/v1alpha1/csidriverconfig_types\.go'
89+
- path: 'api/infra/k8s/ate/v1/csidriverconfig_types\.go'
9090
text: '^requiredfields: .*\bCSIDriverConfigSpec\.(ControllerEndpoint|DriverName)\b'
91-
- path: 'pkg/api/v1alpha1/csidriverconfig_types\.go'
91+
- path: 'api/infra/k8s/ate/v1/csidriverconfig_types\.go'
9292
text: '^optionalfields: .*\bCSIDriverConfigSpec\.NodeSocketOverride\b'
93-
- path: 'pkg/api/v1alpha1/csidriverconfig_types\.go'
93+
- path: 'api/infra/k8s/ate/v1/csidriverconfig_types\.go'
9494
text: '^requiredfields: .*\bCSIDriverTLSConfig\.Enabled\b'
95-
- path: 'pkg/api/v1alpha1/csidriverconfig_types\.go'
95+
- path: 'api/infra/k8s/ate/v1/csidriverconfig_types\.go'
9696
text: '^optionalfields: .*\bCSIDriverTLSConfig\.(ServerName|UsePodIdentity)\b'
97-
- path: 'pkg/api/v1alpha1/csidriverconfig_types\.go'
97+
- path: 'api/infra/k8s/ate/v1/csidriverconfig_types\.go'
9898
text: '^(nonpointerstructs|requiredfields): .*\bCSIDriverConfig\.Spec\b'
99-
- path: 'pkg/api/v1alpha1/workerpool_types\.go'
99+
- path: 'api/infra/k8s/ate/v1/workerpool_types\.go'
100100
text: '^optionalfields: .*\bWorkerPoolPodTemplate\.PriorityClassName\b'
101-
- path: 'pkg/api/v1alpha1/workerpool_types\.go'
101+
- path: 'api/infra/k8s/ate/v1/workerpool_types\.go'
102102
text: '^(optionalfields|requiredfields): .*\bWorkerPoolSpec\.(Replicas|WorkerImage)\b'
103-
- path: 'pkg/api/v1alpha1/workerpool_types\.go'
103+
- path: 'api/infra/k8s/ate/v1/workerpool_types\.go'
104104
text: '^optionalfields: .*\bWorkerPoolStatus\.(ReadyReplicas|Replicas|Selector)\b'
105-
- path: 'pkg/api/v1alpha1/workerpool_types\.go'
105+
- path: 'api/infra/k8s/ate/v1/workerpool_types\.go'
106106
text: '^(optionalfields|requiredfields): .*\bWorkerPool\.(Spec|Status)\b'
107107

108108
issues:

‎AGENTS.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
### Scope
2626

2727
- Keep each PR to one change. Send refactors, cleanups and follow-ups as separate PRs. For how to batch small fixes, see "Sizing PRs for review" in `CONTRIBUTING.md`.
28+
- Split a PR into commits that are easy to review in order. PRs are squash-merged, so only the branch `HEAD` needs to build and pass tests.
2829
- Follow "Contribution process" in `CONTRIBUTING.md`: open an issue first for anything beyond a small fix, and search open PRs and issues before you start.
2930
- Start the PR description with why the change is needed, or link the issue. Only write "Fixes #N" if the PR fully fixes it, and keep the description in sync with the final diff.
3031
- Rebase onto upstream `main` before opening a PR, and don't merge main into your branch. This file may have changed there. Follow that version.
@@ -68,6 +69,7 @@ See `hack/install-ate.sh` and `tools/setup-gcp` for provisioning and deploying c
6869
## Repository Layout
6970

7071
```
72+
api/ # Public APIs: protos and CRD types, one directory per API and version
7173
cmd/ # One subdirectory per binary (ateapi, atelet, atenet, …)
7274
internal/ # Shared packages, internal to this module only
7375
pkg/ # Shared packages intended for external import
@@ -86,11 +88,12 @@ tools/ # Standalone Go tools (go run ./tools/<name>) for Dev/CI
8688
| Only used by one binary | `cmd/<binary>/internal/<pkg>` |
8789
| Shared across binaries, not for external import | `internal/<pkg>` |
8890
| Public API for external consumers | `pkg/<pkg>` |
89-
| Public proto (control-plane gRPC API) | `pkg/proto/<name>` |
91+
| Public gRPC API | `api/<name>/<version>` |
92+
| Kubernetes CRD types | `api/infra/k8s/<group>/<version>` |
9093
| Internal proto (atelet / ateworker) | `internal/proto/<name>` |
9194
| Dev/CI scripts | `hack/` |
9295
| Standalone Go dev/CI tools | `tools/<name>` with its own `go.mod` |
93-
| Self-contained plugin that nothing in the repo depends on | `internal/plugins/<name>` with its own `go.mod`, importing only `pkg/`; see `internal/plugins/README.md` |
96+
| Self-contained plugin that nothing in the repo depends on | `internal/plugins/<name>` with its own `go.mod`, importing only `api/` and `pkg/`; see `internal/plugins/README.md` |
9497

9598
See `docs/dev/code-layout.md` for the full rationale and per-directory details.
9699

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ down, small PRs get merged.
7070
* **Large PRs**: split huge changes into a series of smaller PRs, each a
7171
logically distinct feature. When the intermediate steps are not useful
7272
on their own, keep the change as one PR split into commits at logical
73-
break points, and preserve those commits on merge.
73+
break points for review. PRs are squash-merged, so only the branch
74+
`HEAD` needs to build and pass tests.
7475
* **Small and bulk PRs**: if you find a typo, review the whole file and
7576
fix everything in one pass rather than sending the single edit. Group
7677
related typo, doc, and single-line cleanup fixes into one PR rather

‎README.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
1313

14-
[Quickstart](#quickstart-development) · [Security](docs/security.md) · [Architecture](docs/architecture.md) · [Roadmap](docs/roadmap.md) · [Contributing](CONTRIBUTING.md)
14+
[Quickstart](#quickstart-development) · [Security](docs/security.md) · [Architecture](docs/architecture.md) · [Contributing](CONTRIBUTING.md)
1515

1616
</div>
1717

@@ -260,7 +260,6 @@ We provide several sample applications demonstrating Agent Substrate's capabilit
260260
* [Upgrade Runbook](docs/upgrade.md): Upgrade a running install to a newer supported release, and roll back if needed.
261261
* [Node Storage](docs/node-storage.md): How to give snapshot I/O its own disk.
262262
* [Security Guide](docs/security.md): Security overview, security principles, and threat modeling.
263-
* [Roadmap](docs/roadmap.md): Current limitations and what is planned next.
264263
* [Benchmarking Guide](benchmarking/README.md): Locust-based load tests, monitoring stack, and the orchestrated benchmark harness.
265264

266265
## Tour
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ateapipb
1+
# ateapi
22

33
`ateapi.proto` defines Substrate's public API.
44

0 commit comments

Comments
 (0)