Skip to content

Add create run logs#68

Open
ramilamparo wants to merge 3 commits into
mainfrom
dev/ram/run_logs
Open

Add create run logs#68
ramilamparo wants to merge 3 commits into
mainfrom
dev/ram/run_logs

Conversation

@ramilamparo
Copy link
Copy Markdown
Collaborator

No description provided.

@claude
Copy link
Copy Markdown

claude Bot commented May 19, 2026

Claude finished @ramilamparo's task in 1m 17s —— View job


Review: PR #68 — Add create run logs

  • Gather PR context and diff
  • Launch specialized review subagents
  • Aggregate findings and post review
  • Clean up outdated bot comments

Result: Approved — clean, well-structured addition that follows all established codebase patterns. No security, performance, or code quality issues found. One minor inline suggestion about adding a missing-subcommand-help test entry for the new runs logs intermediate command group.

claude[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@AndrianBdn AndrianBdn left a comment

Choose a reason for hiding this comment

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

I think it would be great to explain what is run log - it is term we coined ourself, there is no alternatives as far as I know. AI system / user could confuse this with something else, so both in SKILL.md / README.md

Clarify what run-level logs are used for in --help, README, and SKILL.md
command tree.
@claude
Copy link
Copy Markdown

claude Bot commented May 26, 2026

Claude finished @ramilamparo's task in 2m 3s —— View job


Review: PR #68 — Add create run logs

  • Gather PR context and diff
  • Launch specialized review subagents
  • Aggregate findings and post review
  • Clean up outdated bot comments

Result: Approved — clean, well-structured addition that follows all established codebase patterns. No security, performance, or code quality issues found. The new commit addresses @AndrianBdn's feedback by adding a clear explanation of what run-level logs are in both README.md and SKILL.md. One minor observation (not blocking) noted in the review about CreateRunLogRequestSchema.comment lacking a .min(1) constraint.

claude[bot]

This comment was marked as outdated.

- Inline runs API methods into the returned object literal and drop unused
  long-form aliases (createRun, listRuns, etc.) to match the pattern used
  by folders/tcases.
- Require non-empty comment in CreateRunLogRequestSchema and add tests
  covering both --comment and --body paths.
@claude
Copy link
Copy Markdown

claude Bot commented May 26, 2026

Claude finished @ramilamparo's task in 5m 3s —— View job


Review: PR #68 — Add create run logs

  • Gather PR context and diff
  • Launch specialized review subagents
  • Aggregate findings and post review
  • Clean up outdated bot comments

Result: Approved — clean, well-structured addition that follows all established codebase patterns. The latest commit addresses prior feedback (.min(1) validation, documentation explaining run-level logs). No security, performance, or blocking code quality issues found. Three minor inline suggestions posted: import type usage, simplifying a test with expectValidationError, and the still-unaddressed missing-subcommand-help entry for runs logs.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Clean, well-structured addition that follows all established codebase patterns. The latest commit addresses the prior .min(1) and documentation feedback nicely.

Review summary:

  • Code quality: Good. One minor nit about import type for CreateRunLogRequest. The refactor from named functions to inline object methods is clean and removes the unnecessary aliases.
  • Security: No vulnerabilities. Path params are Zod-validated, auth uses the standard middleware, body is JSON-serialized safely. HTML in --comment is by design (server-side rendering responsibility).
  • Performance: No concerns — single POST request with O(1) work.
  • Test coverage: Adequate — covers happy path, body input variants, validation errors (including the new empty-comment rejection), and a live integration test. Three minor suggestions posted inline.

QueryPlansSchema,
CloneRunRequestSchema,
type ListRunTCasesRequest,
CreateRunLogRequest,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: CreateRunLogRequest is only used as a type annotation (body as CreateRunLogRequest), so it should be type CreateRunLogRequest to match the existing pattern on line 7 (type ListRunTCasesRequest).

Alternatively, you could use body as Parameters<typeof api.runs.createLog>[2] like the create and clone endpoints do, which would make this import unnecessary entirely.

Comment on lines +93 to +108
test('rejects empty --comment', async () => {
const exitSpy = vi.spyOn(process, 'exit').mockImplementation(() => {
throw new Error('process.exit')
})
const errorSpy = vi.spyOn(console, 'error').mockImplementation(() => {})
try {
await expect(
runCommand('--project-code', 'PRJ', '--run-id', '1', '--comment', '')
).rejects.toThrow('process.exit')
const errorOutput = errorSpy.mock.calls.map((c) => c.join(' ')).join('\n')
expect(errorOutput).toMatch(/--comment.*must not be empty/)
} finally {
exitSpy.mockRestore()
errorSpy.mockRestore()
}
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: This manually reimplements the expectValidationError pattern (spy on process.exit, spy on console.error, assert, restore) that's already imported and used just above. Could simplify to:

test('rejects empty --comment', async () => {
    await expectValidationError(
        () => runCommand('--project-code', 'PRJ', '--run-id', '1', '--comment', ''),
        /--comment.*must not be empty/
    )
})

@@ -0,0 +1,130 @@
import { HttpResponse, http, type PathParams } from 'msw'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit (repeat from prior review — still unaddressed): The ['runs', 'logs', 'create'] command path introduces runs logs as a new intermediate subcommand group. Consider adding a corresponding entry in missing-subcommand-help.spec.ts:

{ args: ['api', 'runs', 'logs'], label: '`api runs logs`' },

Minor — the builder handles this generically, so it's unlikely to break, but it would keep the help-text test coverage consistent with other intermediate groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants