You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,7 +187,7 @@ To create or rewrite a module's README, invoke the `/readme <module-path>` skill
187
187
188
188
## Common Gotchas
189
189
190
-
1.**`kyo.System` shadows `java.lang.System`**: use fully qualified`java.lang.System`when needed
190
+
1.**`kyo.System` shadows `java.lang.System`**, and **`kyo.SecureRandom` shadows`java.security.SecureRandom`**: use the fully qualified JDK name when both are in scope
191
191
2.**Effect handlers are not inline**: `Abort.run`, `Var.run` are regular methods; only suspend/create methods are inline
192
192
3.**`Frame` required on every effectful method**, but not on pure data accessors like `capacity` or `size`
193
193
4.**Overloads delegate to canonical**: never duplicate logic across method variants
-[Running CI in Your Fork](#running-ci-in-your-fork)
11
12
-[Adding a New API](#adding-a-new-api)
12
13
-[LLM Use Guide](#llm-use-guide)
13
14
-[Core Principles](#core-principles)
@@ -129,6 +130,20 @@ Check formatting before submitting:
129
130
sbt "scalafmtCheckAll"
130
131
```
131
132
133
+
### Running CI in Your Fork
134
+
135
+
Pull requests to the main repository currently require maintainer approval before CI runs, so checks may not start right away. To get full CI signal on your own schedule, run the same workflows in your fork. They use only GitHub-hosted runners that are free for public repositories and read no repository secrets, so they run unmodified.
136
+
137
+
1.**Enable Actions on your fork.** GitHub disables a fork's workflows by default. Open your fork's **Actions** tab (`https://github.com/<your-user>/<your-fork>/actions`) and enable them when prompted.
138
+
139
+
2.**Run the `ci` workflow.** In the **Actions** tab, select **ci** and click **Run workflow**, then choose your branch. Set **oses** to `linux-x64 linux-arm64` to match what pull-request CI runs. Leave **mode** as `full` for a complete run, or set it to `diff` to test only the modules your branch changed. The Windows pole is not part of PR CI; add `windows-x64` to **oses** to include it.
140
+
141
+
3.**Or open a fork-internal pull request.** A PR from your working branch against your fork's own `main` triggers the same diff-mode run an upstream PR would, on your runners, with no approval needed. It also runs `release-probe`, a no-secrets publishability check, for free.
142
+
143
+
Diff mode compares against your fork's `main`, so sync your fork before a diff-mode run (the **Sync fork** button, or `git fetch upstream && git push origin main`) to match upstream. The first run is slower while the runner caches warm up.
144
+
145
+
When you open your pull request, include a link to the fork CI run if you have one, so reviewers can see the result.
146
+
132
147
### Adding a New API
133
148
134
149
If you want to contribute a new method or type, feel free to:
@@ -243,11 +258,16 @@ When a Kyo primitive exists for a concept, use it instead of the stdlib equivale
243
258
|`Result[E, A]`|`Either`, `Try`| Three-way: `Success`/`Failure`/`Panic` — never raw `Either` or `Try` in effect signatures |
244
259
|`Chunk[A]`|`Seq`, `List`, `Vector`| Use internally; accept generic collections in public APIs (see below) |
|`TypeMap[A]`| Heterogeneous maps | Type-safe map keyed by type |
250
266
267
+
Prefer `ByteSize` over a bare numeric type wherever a value means "a quantity of bytes": storage and disk sizes, file sizes, buffer and byte-array capacities, read and write chunk sizes, network packet and frame sizes, transfer limits and quotas, memory footprints. It carries the unit in the type, so a call site cannot silently pass kibibytes where bytes were expected, and its arithmetic saturates instead of overflowing. A raw `Long` or `Int` stays correct for an index, an offset into a buffer, or a count of elements; those are positions, not sizes.
268
+
269
+
This is guidance for new and changed code. Existing APIs that thread byte counts as `Long` are not required to migrate, and a migration should be its own change rather than a drive-by edit inside an unrelated one.
0 commit comments