refactor: rename internal Fai* design system + fai_ helpers to chain
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
The Studio design system, widgets and helpers carried a Fai* / fai_ prefix (FaiSpace, FaiColors, FaiTheme, FaiLog, 17 fai_*.dart files, the faiBinary* l10n keys). Studio is the Ch∆In product, so rename them to Chain* / chain_ — carefully preserving English fail/failure/failed. Also fix stale references: the 'fai' binary in l10n strings -> 'chain', FAI_* env vars (FAI_BIN/DATA_DIR/MODULES_DIR/TODAY/BOOTSTRAP_TOKEN) -> CHAIN_*, fai_platform -> fai_chain, fai_hub -> chain_hub. Vendor security-hook tooling (FAI_BANNED_TERMS_FILE) + the .fai bundle ext left. flutter analyze + test: clean (20 passed). Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
68d23ab7dd
commit
891acd2ba2
52 changed files with 1225 additions and 1225 deletions
|
|
@ -35,14 +35,14 @@ flutter test test/integration/
|
|||
```
|
||||
|
||||
Prereq: a `fai` binary on PATH or at
|
||||
`../fai_platform/target/release/fai`. The harness skips with a
|
||||
`../fai_chain/target/release/chain`. The harness skips with a
|
||||
clear message when neither exists, so this command does not
|
||||
fail on a fresh checkout — it just reports skipped tests.
|
||||
|
||||
To get the binary:
|
||||
|
||||
```bash
|
||||
cd ../fai_platform
|
||||
cd ../fai_chain
|
||||
cargo build --release --bin fai
|
||||
```
|
||||
|
||||
|
|
@ -52,11 +52,11 @@ A cold `chain serve` spends its first ~30s building the
|
|||
curated-model database and initialising SQLite migrations.
|
||||
`HubFixture.start()` waits up to 60s by default; if your local
|
||||
hub takes longer the first time, run `chain serve` once by hand
|
||||
against any temp `FAI_DATA_DIR` to warm the per-user cargo /
|
||||
against any temp `CHAIN_DATA_DIR` to warm the per-user cargo /
|
||||
SBOM caches:
|
||||
|
||||
```bash
|
||||
FAI_DATA_DIR=/tmp/fai_warmup chain serve --bind 127.0.0.1:0
|
||||
CHAIN_DATA_DIR=/tmp/chain_warmup chain serve --bind 127.0.0.1:0
|
||||
# wait for "hub started", Ctrl-C
|
||||
```
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ Subsequent integration-test runs are quick.
|
|||
|
||||
`.forgejo/workflows/ci.yml` doesn't run these yet. Adding them
|
||||
needs an artifact-passing pattern: the platform build job
|
||||
publishes `target/release/fai` as a CI artifact; the studio
|
||||
publishes `target/release/chain` as a CI artifact; the studio
|
||||
test job consumes it. Pattern is straightforward once we want
|
||||
it; it's deferred because we don't yet have enough integration
|
||||
tests to justify the CI runtime.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
// flutter test test/integration/
|
||||
//
|
||||
// CI does not yet run these by default — they need a built `fai`
|
||||
// binary in PATH or in ../fai_platform/target/release/. Wire that
|
||||
// binary in PATH or in ../chain_platform/target/release/. Wire that
|
||||
// in via .forgejo/workflows/ci.yml once the platform CI publishes
|
||||
// a Linux binary as an artifact for downstream jobs to consume.
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class HubFixture {
|
|||
if (skipIfBinaryMissing) {
|
||||
markTestSkipped(
|
||||
'Hub fixture skipped: no `fai` binary found on PATH or in '
|
||||
'../fai_platform/target/release/fai. Build it with '
|
||||
'../chain_platform/target/release/fai. Build it with '
|
||||
'`cargo build --release` and re-run.',
|
||||
);
|
||||
return null;
|
||||
|
|
@ -86,15 +86,15 @@ class HubFixture {
|
|||
|
||||
// Run as a child process. `serve --bind` lets us avoid the
|
||||
// default 50051 (and any local daemon the developer happens
|
||||
// to be running). FAI_DATA_DIR keeps the temp footprint
|
||||
// to be running). CHAIN_DATA_DIR keeps the temp footprint
|
||||
// contained — no state leaks into ~/.fai.
|
||||
final process = await Process.start(
|
||||
binary,
|
||||
['serve', '--bind', addr],
|
||||
environment: {
|
||||
...Platform.environment,
|
||||
'FAI_DATA_DIR': tempDir.path,
|
||||
'FAI_MODULES_DIR': '${tempDir.path}/modules',
|
||||
'CHAIN_DATA_DIR': tempDir.path,
|
||||
'CHAIN_MODULES_DIR': '${tempDir.path}/modules',
|
||||
// Suppress info logs without a CLI flag — the binary
|
||||
// respects RUST_LOG for tracing-subscriber.
|
||||
'RUST_LOG': 'warn',
|
||||
|
|
@ -136,7 +136,7 @@ class HubFixture {
|
|||
await tempDir.delete(recursive: true);
|
||||
throw StateError(
|
||||
'Hub did not become healthy within $readyTimeout. '
|
||||
'Check `fai serve` works manually with FAI_DATA_DIR=$tempDir.',
|
||||
'Check `fai serve` works manually with CHAIN_DATA_DIR=$tempDir.',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -172,8 +172,8 @@ class HubFixture {
|
|||
}
|
||||
|
||||
final candidate = Platform.isWindows
|
||||
? '../fai_platform/target/release/fai.exe'
|
||||
: '../fai_platform/target/release/fai';
|
||||
? '../chain_platform/target/release/fai.exe'
|
||||
: '../chain_platform/target/release/fai';
|
||||
final f = File(candidate);
|
||||
if (await f.exists()) {
|
||||
return f.absolute.path;
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
// flutter test test/integration/plugin_theme_test.dart
|
||||
//
|
||||
// Pre-reqs (handled by HubFixture's skip-when-missing path):
|
||||
// - fai binary on PATH or at ../fai_platform/target/release/fai
|
||||
// - fai binary on PATH or at ../chain_platform/target/release/fai
|
||||
// - studio-theme-solarized plugin built to module.wasm in its
|
||||
// fai_plugins dir.
|
||||
// chain_plugins dir.
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ void main() {
|
|||
// add network + bundle-fetch latency that doesn't
|
||||
// belong in an in-process round-trip test.
|
||||
final pluginSrc = Directory(
|
||||
'../fai_plugins/studio-theme-solarized',
|
||||
'../chain_plugins/studio-theme-solarized',
|
||||
);
|
||||
if (!await pluginSrc.exists()) {
|
||||
markTestSkipped('studio-theme-solarized source not available');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue