GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Config: the factory's machine config and a repo's factory block by rawphp · Pull Request #19866 · pingdotgg/t3code

Config: the factory's machine config and a repo's factory block #19866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rawphp wants to merge 16 commits into pingdotgg:main from original-solutions:t3/factory-issue-11
+1,857 −0
Closed

Config: the factory's machine config and a repo's factory block #19866

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
55f49ea
chore: factory block for softfac
rawphp Oct 15, 2026
e4bcce9
Merge pull request #29 from original-solutions/factory/dw-config
tomkaczocha Oct 15, 2026
7abf1e1
test: factory layer logs factory started
rawphp Oct 15, 2026
f5af01a
feat(server): wire an empty FactoryLayer through server.ts
rawphp Oct 15, 2026
595cc20
test: check-seams.sh passes allowed changes and names unlisted ones
rawphp Oct 15, 2026
f07d8e2
feat(factory): add UPSTREAM, SEAMS and check-seams.sh
rawphp Oct 15, 2026
95afcec
test(factory): boundary test for factory imports
rawphp Oct 15, 2026
611af0d
docs(factory): design copy and README
rawphp Oct 15, 2026
cc1c0ac
test(factory): import vitest helpers from vite-plus/test
rawphp Oct 15, 2026
cbcf91a
test(factory): rename into an allowed path is named, seam assertions …
rawphp Oct 15, 2026
0aadcf1
fix(factory): check-seams.sh diffs without rename detection
rawphp Oct 15, 2026
71ba6b4
fix(factory): close boundary and seam-check gaps from review
rawphp Oct 15, 2026
f1dba9a
Merge pull request #30 from original-solutions/t3/t3code-factory-issue-1
tomkaczocha Oct 15, 2026
aa0abf2
test(factory): port config parsing tests and the config-driven start
rawphp Oct 15, 2026
45a137e
feat(factory): load the machine config and start only when it is valid
rawphp Oct 15, 2026
7265e29
refactor(factory): define the config error shape once
rawphp Oct 15, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
feat(factory): load the machine config and start only when it is valid
Adds config.ts (project and machine config parsing ported from softfac,
plus loaders), the FactoryPaths service with its T3 layer, and makes the
factory log no-config, config errors, or started. Also fixes test-helper
slips in the ported tests (repos error path, 90.0 fixture, layer wiring).

Issue: #11
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@rawphp
rawphp committed Oct 15, 2026
commit 45a137e8f2f89310b45f29fdb63f0c8ffcb85688

There are no files selected for viewing

44 changes: 24 additions & 20 deletions 44 apps/server/src/factory/config.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ const projectBad = (path: string, yaml: string) => {
assertOne(projectErr(edit(PROJECT, (t) => set(t, path, yaml))), path, PFILE);
};

const machineMissing = (path: string) => {
assertOne(machineErr(edit(MACHINE, (t) => remove(t, path))), path, MFILE);
const machineMissing = (path: string, errorPath = path) => {
assertOne(machineErr(edit(MACHINE, (t) => remove(t, path))), errorPath, MFILE);
};

/** Set `editPath` (tree address, e.g. `repos.0.path`), expect the error at `errorPath` (`repos[0].path`). */
Expand Down Expand Up @@ -348,9 +348,10 @@ describe("project config", () => {
it("project minutes zero", () => projectBad("factory.limits.minutes", "0"));
it("project minutes negative", () => projectBad("factory.limits.minutes", "-5"));
it("project minutes fractional", () => projectBad("factory.limits.minutes", "1.5"));
it("project minutes written as 1.0 is fractional", () => {
const errs = projectErr(edit(PROJECT, (tree) => set(tree, "factory.limits.minutes", "1.0")));
it("project minutes written as 90.0 is fractional", () => {
const errs = projectErr(PROJECT.replace("minutes: 90", "minutes: 90.0"));
assertOne(errs, "factory.limits.minutes", PFILE);
expect(errs[0]!.message).toBe("must be an integer of at least 1");
});
it("project gate retries not an integer", () =>
projectBad("factory.limits.gate_retries", "many"));
Expand Down Expand Up @@ -449,7 +450,7 @@ describe("machine config", () => {
it("machine missing max concurrent runs", () => machineMissing("max_concurrent_runs"));
it("machine missing model", () => machineMissing("model"));
it("machine missing repos", () => machineMissing("repos"));
it("machine repo missing repo", () => machineMissing("repos.0.repo"));
it("machine repo missing repo", () => machineMissing("repos.0.repo", "repos[0].repo"));
it("machine repo missing path", () => {
const t = edit(MACHINE, (tree) => remove(tree, "repos.0.path"));
assertOne(machineErr(t), "repos[0].path", MFILE);
Expand Down Expand Up @@ -485,20 +486,19 @@ describe("machine config", () => {
});

describe("strings", () => {
for (const key of ["model", "model_instance", "gh_config_dir"]) {
it(`machine ${key} empty`, () => {
machineBad(key, '""');
expect(machineErr(edit(MACHINE, (t) => set(t, key, '""')))[0]!.message).toBe(
"must not be empty",
);
});
it(`machine ${key} not a string`, () => {
machineBad(key, "[x]");
expect(machineErr(edit(MACHINE, (t) => set(t, key, "[x]")))[0]!.message).toBe(
"must be a string",
);
});
}
const KEYS = ["model", "model_instance", "gh_config_dir"];
it.each(KEYS)("machine %s empty", (key) => {
machineBad(key, '""');
expect(machineErr(edit(MACHINE, (t) => set(t, key, '""')))[0]!.message).toBe(
"must not be empty",
);
});
it.each(KEYS)("machine %s not a string", (key) => {
machineBad(key, "[x]");
expect(machineErr(edit(MACHINE, (t) => set(t, key, "[x]")))[0]!.message).toBe(
"must be a string",
);
});
});

describe("repos", () => {
Expand Down Expand Up @@ -582,7 +582,11 @@ describe("machine config", () => {

describe("loaders", () => {
const withTempDir = <A, E>(
body: (dir: string, fs: FileSystem.FileSystem, path: Path.Path) => Effect.Effect<A, E>,
body: (
dir: string,
fs: FileSystem.FileSystem,
path: Path.Path,
) => Effect.Effect<A, E, FileSystem.FileSystem>,
) =>
Effect.scoped(
Effect.gen(function* () {
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.