Skip to content

feat(logs): write app log lines, getLog, Retry-After on NorbixError - #102

Merged
Domantas merged 4 commits into
mainfrom
feat/logs-stage-a
Oct 21, 2026
Merged

Domantas merged 4 commits into
mainfrom
feat/logs-stage-a

Conversation

@Domantas

Copy link
Copy Markdown
Contributor

What changed

  • Types regenerated from gateway audit/logging (private stack): WriteLogs (Api), GetLog (Hub), SaveLogSettings fields optional (absent = unchanged), AWS CloudWatch logging DTOs. Also refactoringV2 items (Files register, team endpoints) — nothing removed.
  • norbix.api.logs.writeLogs({ entries }) (generated) + hand-written norbix.api.logs.write(line | lines); norbix.hub.logs.getLog({ id }).
  • NorbixError.retryAfterSeconds — the Retry-After header in seconds (429 CM-ERRORS-LOGGING-003). New optional field only.
  • Docs: docs/api/logs.md, docs/hub/logs.md (test a logging integration after every save — nothing is delivered until its last test passed), README.

Tests

npx vitest run 66 files / 1087 tests green · npm run lint · npx prettier --check . · npx tsc --noEmit · npm run build · npm run typecheck:dist.

Expected version

4.31.0 (feat → minor).

🤖 Generated with Claude Code

Domantas and others added 4 commits October 21, 2026 21:18
Generated from the private stack (Hub 127.0.0.1:15101, Api 127.0.0.1:15102),
gateway branch audit/logging (includes refactoringV2 as of 2026-10-21).
(Type `gen` is not in this repo's commitlint list; `feat(types)` as in 019b278.)

Logs: WriteLogs / WriteLogEntry / WriteLogsResponse (Api), GetLog /
GetLogResponse (Hub), SaveLogSettings fields now optional (absent =
unchanged), AwsCloudWatchLoggingIntegrationRequest/Dto, TenantLogEntryDto.origin.

Also brought in from refactoringV2: RegisterFilesRequest (+ items/results),
ownerUserId / reassignOwner on Files requests, endUserOwnRecords on schema
DTOs. Nothing removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on NorbixError

- norbix.api.logs.writeLogs({ entries }) (generated, POST /{version}/logs on
  the Api host) and the hand-written norbix.api.logs.write(line | lines).
- norbix.hub.logs.getLog({ id }) (generated, GET /{version}/logs/{Id}).
- NorbixError.retryAfterSeconds: the answer's Retry-After header in seconds
  (a 429 CM-ERRORS-LOGGING-003 from writeLogs). New optional field; nothing
  else on NorbixError changes. The SDK still never retries a POST.
- Tests with a fake fetch: every entry field in the body, one line wrapped in
  a list, accepted count, 429 thrown once with retryAfterSeconds = 7, 400
  CM-ERRORS-LOGGING-002, getLog id in the path, saveLogSettings sends only
  the given fields, MongoDB integration save then testLoggingIntegration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d, test after save

docs/api/logs.md: write / writeLogs with every field, the refusals, and
retryAfterSeconds on a 429. docs/hub/logs.md: getLog, saveLogSettings sends
only what you give, and nothing is delivered to a logging integration until
its last test passed (call testLoggingIntegration after every save).
README: api.logs row, Retry-After in Error handling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
generate-endpoints run over the regenerated types adds the methods whose DTOs
arrived from gateway refactoringV2: hub.account repairEnvironmentBuiltIns,
removeTeamMember, setTeamMemberRoleEnvironments, getAccountTeamInvitations,
cancelTeamInvitation, updateTeamMember; hub.database endUserOwnRecordsReport;
api.files registerFiles. Generated tests and reference pages only; no
hand-written helpers for them in this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🚀 Release preview

Next version on merge to main: none

semantic-release dry-run output
[6:19:48 PM] [semantic-release] › ℹ  Running semantic-release version 25.0.9
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[6:19:48 PM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[6:19:50 PM] [semantic-release] › ℹ  This test run was triggered on the branch refs/pull/102/merge, while semantic-release is configured to only publish from main, therefore a new version won’t be published.

If next_version is none, your commits don't trigger a release. Use feat: for minor (breaking changes too, until launch), fix: / perf: for patch.

@Domantas
Domantas merged commit 14574a2 into main Oct 21, 2026
8 checks passed
@Domantas
Domantas deleted the feat/logs-stage-a branch October 21, 2026 18:21
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 4.31.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant