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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ test-dry-run.json
vite.config.*.timestamp-*
.DS_Store
/.idea
software/**/*.tgz
.vscode/sftp.json
1 change: 1 addition & 0 deletions .structure
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
7 changes: 2 additions & 5 deletions block/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { BlockPackDescriptionAbsolute } from '@platforma-sdk/block-tools';

declare function loadBlockDescription(): BlockPackDescriptionAbsolute;
declare const blockSpec: {
type: 'dev-v2';
type: "dev-v2";
folder: string;
};

export { loadBlockDescription, blockSpec };
export { blockSpec };
11 changes: 2 additions & 9 deletions block/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
const blockTools = require('@platforma-sdk/block-tools');

async function loadBlockDescription() {
return await blockTools.loadPackDescriptionFromSource(__dirname);
}

const blockSpec = {
type: 'dev-v2',
folder: __dirname
type: "dev-v2",
folder: __dirname,
};

module.exports = {
blockSpec,
loadBlockDescription
};
23 changes: 12 additions & 11 deletions block/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{
"name": "@platforma-open/milaboratories.gpu-test",
"version": "0.7.2",
"files": [
"index.d.ts",
"index.js"
],
"scripts": {
"build": "shx rm -rf ./block-pack && block-tools pack",
"mark-stable": "block-tools mark-stable -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'",
"prepublishOnly": "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'",
"do-pack": "shx rm -f *.tgz && block-tools pack && pnpm pack && shx mv *.tgz package.tgz"
},
"files": [
"index.d.ts",
"index.js"
],
"dependencies": {
"@platforma-open/milaboratories.gpu-test.workflow": "workspace:*",
"@platforma-open/milaboratories.gpu-test.model": "workspace:*",
"@platforma-open/milaboratories.gpu-test.ui": "workspace:*"
"@platforma-open/milaboratories.gpu-test.ui": "workspace:*",
"@platforma-open/milaboratories.gpu-test.workflow": "workspace:*"
},
"devDependencies": {
"@platforma-sdk/block-tools": "file:/Users/pvyazankin/mictx5/core/platforma/tools/block-tools/package.tgz",
"shx": "catalog:"
},
"packageManager": "pnpm@9.12.0",
"block": {
"components": {
"workflow": "@platforma-open/milaboratories.gpu-test.workflow/dist/tengo/tpl/main.plj.gz",
Expand All @@ -41,9 +46,5 @@
"linux-aarch64"
]
}
},
"devDependencies": {
"@platforma-sdk/block-tools": "catalog:"
},
"packageManager": "pnpm@9.12.0"
}
}
4 changes: 4 additions & 0 deletions model/.oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["node_modules/@milaboratories/ts-builder/configs/oxfmt.json"],
"ignorePatterns": ["dist", "coverage", "CHANGELOG.md"]
}
3 changes: 3 additions & 0 deletions model/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["node_modules/@milaboratories/ts-builder/dist/configs/oxlint-block-model.json"]
}
4 changes: 0 additions & 4 deletions model/eslint.config.mjs

This file was deleted.

17 changes: 11 additions & 6 deletions model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"sources": "./src/index.ts",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"import": "./dist/index.js"
},
"./dist/*": "./dist/*"
},
Expand All @@ -20,18 +20,23 @@
"type-check": "ts-builder type-check --target block-model",
"test": "vitest",
"lint": "eslint .",
"do-pack": "shx rm -f *.tgz && pnpm pack && shx mv *.tgz package.tgz"
"do-pack": "shx rm -f *.tgz && pnpm pack && shx mv *.tgz package.tgz",
"fmt": "ts-builder format",
"check": "ts-builder check --target block-model"
},
"dependencies": {
"@platforma-sdk/model": "catalog:"
},
"devDependencies": {
"@milaboratories/ts-builder": "catalog:",
"@milaboratories/ts-configs": "catalog:",
"@platforma-sdk/block-tools": "catalog:",
"@platforma-sdk/block-tools": "file:/Users/pvyazankin/mictx5/core/platforma/tools/block-tools/package.tgz",
"@platforma-sdk/eslint-config": "catalog:",
"eslint": "catalog:",
"vitest": "catalog:",
"typescript": "catalog:"
"vitest": "catalog:"
},
"peerDependencies": {
"@types/node": "*",
"typescript": "*"
}
}
22 changes: 14 additions & 8 deletions model/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BlockModel } from '@platforma-sdk/model';
import { BlockModel } from "@platforma-sdk/model";

export type BlockArgs = {
seed: number;
Expand All @@ -12,17 +12,23 @@ export type BlockArgs = {
export type UiState = {};

export const model = BlockModel.create()
.withArgs<BlockArgs>({ seed: Math.floor(Math.random() * 2147483647), matrixSize: '4000', gpuMemory: '1GiB', cpu: '1', mem: '1GiB' })
.withArgs<BlockArgs>({
seed: Math.floor(Math.random() * 2147483647),
matrixSize: "4000",
gpuMemory: "1GiB",
cpu: "1",
mem: "1GiB",
})
.withUiState<UiState>({})
.argsValid(() => true)

.output('gpuLog', (ctx) => ctx.outputs?.resolve('gpuLog')?.getLogHandle())
.output('gpuInfo', (ctx) => ctx.outputs?.resolve('gpuInfo')?.getDataAsJson<GpuReport>())
.output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)
.output('seed', (ctx) => ctx.outputs?.resolve('seed')?.getDataAsString())
.output("gpuLog", (ctx) => ctx.outputs?.resolve("gpuLog")?.getLogHandle())
.output("gpuInfo", (ctx) => ctx.outputs?.resolve("gpuInfo")?.getDataAsJson<GpuReport>())
.output("isRunning", (ctx) => ctx.outputs?.getIsReadyOrError() === false)
.output("seed", (ctx) => ctx.outputs?.resolve("seed")?.getDataAsString())

.title(() => 'GPU Detection')
.sections(() => [{ type: 'link' as const, href: '/' as const, label: 'GPU Info' }])
.title(() => "GPU Detection")
.sections(() => [{ type: "link" as const, href: "/" as const, label: "GPU Info" }])
.done(2);

export interface GpuReport {
Expand Down
7 changes: 1 addition & 6 deletions model/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"extends": "@milaboratories/ts-configs/block/model",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
"include": ["src/**/*"]
}
28 changes: 20 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,37 @@
"scripts": {
"build": "turbo run build",
"build:dev": "env PL_PKG_DEV=local turbo run build",
"build:dev-remote": "env PL_PKG_DEV=local PL_DOCKER_BUILD=1 PL_DOCKER_AUTOPUSH=1 turbo run build --force",
"build:dev-remote": "env PL_PKG_DEV=local PL_DOCKER_BUILD=1 PL_DOCKER_AUTOPUSH=1 turbo run build",
"lint": "turbo run lint",
"type-check": "turbo run type-check",
"test": "env PL_PKG_DEV=local turbo run test --concurrency 1 --env-mode=loose",
"test": "env PL_PKG_DEV=local turbo run test --concurrency 1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 --env-mode=loose removed from root test script

The previous command was turbo run test --concurrency 1 --env-mode=loose. Turbo's default strict env-mode only passes the variables explicitly listed in each task's passThroughEnv; loose forwarded the full environment. The workflow test task in turbo.json lists PL_ADDRESS, PL_TEST_PASSWORD, PL_TEST_USER, PL_TEST_PROXY, and DEBUG, but any other env var that integration tests currently depend on will silently be unavailable after this change. Verify that no active test relies on variables outside that explicit list.

Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 8

Comment:
**`--env-mode=loose` removed from root test script**

The previous command was `turbo run test --concurrency 1 --env-mode=loose`. Turbo's default strict env-mode only passes the variables explicitly listed in each task's `passThroughEnv`; `loose` forwarded the full environment. The workflow `test` task in `turbo.json` lists `PL_ADDRESS`, `PL_TEST_PASSWORD`, `PL_TEST_USER`, `PL_TEST_PROXY`, and `DEBUG`, but any other env var that integration tests currently depend on will silently be unavailable after this change. Verify that no active test relies on variables outside that explicit list.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

"do-pack": "turbo run do-pack",
"watch": "turbo watch build",
"changeset": "changeset",
"version-packages": "changeset version",
"update-sdk": "block-tools update-deps"
"update-sdk": "block-tools structure refresh --update-deps-only",
"fmt": "turbo run fmt",
"check": "turbo run check",
"test:dry-run": "env PL_PKG_DEV=local turbo run test --dry-run=json",
"mark-stable": "turbo run mark-stable",
"update": "block-tools structure refresh --update-deps-only && pnpm i && block-tools structure refresh && pnpm fmt"
},
"devDependencies": {
"@changesets/cli": "catalog:",
"@platforma-sdk/block-tools": "catalog:",
"@milaboratories/ts-builder": "catalog:",
"@platforma-sdk/block-tools": "file:/Users/pvyazankin/mictx5/core/platforma/tools/block-tools/package.tgz",
"shx": "catalog:",
"turbo": "catalog:",
"typescript": "catalog:",
"shx": "catalog:"
"typescript": "catalog:"
},
"peerDependencies": {
"oxfmt": "*",
"oxlint": "*"
},
"packageManager": "pnpm@9.12.0",
"//pnpm": {
"overrides": {}
"pnpm": {
"overrides": {
"@platforma-sdk/block-tools": "file:///Users/pvyazankin/mictx5/core/platforma/tools/block-tools/package.tgz"
}
}
Comment on lines +33 to 37

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Developer-local file path in pnpm override

@platforma-sdk/block-tools is overridden to file:///Users/pvyazankin/mictx5/core/platforma/tools/block-tools/package.tgz — a path that exists only on the author's machine. Any other contributor or CI runner that runs pnpm install will fail immediately with a resolution error because the .tgz file won't be present at that absolute path. The same local-path entry also appears in pnpm-lock.yaml (under the overrides: section and each importer that uses block-tools), so even without the package.json override the lockfile will force the broken resolution.

Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 33-37

Comment:
**Developer-local file path in pnpm override**

`@platforma-sdk/block-tools` is overridden to `file:///Users/pvyazankin/mictx5/core/platforma/tools/block-tools/package.tgz` — a path that exists only on the author's machine. Any other contributor or CI runner that runs `pnpm install` will fail immediately with a resolution error because the `.tgz` file won't be present at that absolute path. The same local-path entry also appears in `pnpm-lock.yaml` (under the `overrides:` section and each importer that uses `block-tools`), so even without the `package.json` override the lockfile will force the broken resolution.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

Comment on lines +33 to 37

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The pnpm.overrides section contains a hardcoded local file path (file:///Users/pvyazankin/...) for @platforma-sdk/block-tools. This will break the installation and build process for other developers and CI/CD environments. Please remove this local override before merging.

  "pnpm": {
    "overrides": {}
  }

}
Loading
Loading