Skip to content

chore: promote release-candidate to main#328

Merged
fredcamaral merged 13 commits into
mainfrom
release-candidate
Jul 24, 2026
Merged

chore: promote release-candidate to main#328
fredcamaral merged 13 commits into
mainfrom
release-candidate

Conversation

@fredcamaral

Copy link
Copy Markdown
Member

Promotes release-candidate into main (stable). Carries the release-candidate
delta since the last stable sync (3.1.0-beta.2 train).

Includes, among the beta content already reviewed on develop:

Closes #326

https://claude.ai/code/session_01WscfYUmQmJ7KWNGE18mXNB

lerian-studio and others added 12 commits July 14, 2026 12:24
Upgrade the Go toolchain from 1.26.4 to 1.26.5 across the repository,
including go.mod, go.work, and GitHub Actions workflows, to ensure the
build runs on the latest language patch release.

Update the LerianStudio shared GitHub Actions workflows to v1.46.1
to leverage the latest CI/CD pipeline capabilities and bug fixes.

Update multiple Go module dependencies to their newest versions to
incorporate upstream bug fixes, security patches, and performance
improvements.
Changelog atualizado.
Picks up the ArgoCD wait-timeout backoff fix and the Ungoliant curl-timeout increase (300s -> 900s) from github-actions-shared-workflows v1.46.2.
The plugin_crm extraction path decrypted contact, banking_details, legal_person and natural_person fields but not regulatory_fields or related_parties, so participant_document (a CNPJ) and related_parties[].document were projected as ciphertext into the snapshot -- the root cause of CCS-0011 in br-ccs batch generation.

Add decryptRegulatoryFields and decryptRelatedParties, mirroring the existing per-object decryptors and reusing the same crypto instance; wire both into decryptNestedFields. Verified against the live dev-st CRM (KMS_VENDOR=none): all values are legacy AES-GCM (no tink: format). Fail-closed on undecryptable values; name/role/dates stay plaintext.

X-Lerian-Ref: 0x1
Changelog atualizado.
…registry

In single-tenant mode, LoadInternalConnectionsFromEnv silently skipped any
DATASOURCE_*_CONFIG_NAME whose value was not in the internal registry, so a
typo (e.g. midaz_onbaording) produced a datasource that never loaded with no
diagnostic. Emit a WARN naming the offending value and the accepted set; an
empty CONFIG_NAME stays silent (nothing to flag). Covers Manager and Worker
via the shared loader.

Closes #326

Claude-Session: https://claude.ai/code/session_01WscfYUmQmJ7KWNGE18mXNB
@fredcamaral
fredcamaral requested a review from a team as a code owner July 24, 2026 02:46
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Go 1.26.5 and shared workflow versions were updated across CI, module dependencies were refreshed, engine beta changelog entries were added, and resolver handling now distinguishes empty from unknown datasource configuration names with deterministic warnings.

Changes

Resolver configuration logging

Layer / File(s) Summary
Configuration-name handling and validation
pkg/resolver/env_loader.go, pkg/resolver/env_loader_test.go
LoadInternalConnectionsFromEnv silently skips empty names, warns for unknown names with sorted accepted values, and adds tests for both behaviors.

Go tooling and release metadata

Layer / File(s) Summary
CI workflow version updates
.github/workflows/*.yml
Engine, fuzz, PR validation, release, and routine workflows use Go 1.26.5 where configured and newer shared workflow versions.
Module and release metadata
go.mod, pkg/engine/go.mod, pkg/engine/CHANGELOG.md
Go directives and dependency versions were refreshed, and engine beta release entries were added to the changelog.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch release-candidate

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/resolver/env_loader_test.go`:
- Around line 316-319: Update the assertions in the logger.entries verification
to require that no log entries are emitted when CONFIG_NAME is empty, rather
than checking only each entry’s config_name field. Preserve the existing test
setup and silent-skip contract while asserting logger.entries is empty.
- Around line 15-40: Update the test covering the empty CONFIG_NAME path to
assert that capturingLogger.entries is empty, ensuring no log is emitted when
configuration loading is skipped. Retain the existing field assertions for paths
that do log, and use the capturingLogger implementation to verify silence.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 14ac078c-470e-49fa-8b4b-fc099f5875e9

📥 Commits

Reviewing files that changed from the base of the PR and between 19cfb38 and f68ff94.

⛔ Files ignored due to path filters (2)
  • go.sum is excluded by !**/*.sum
  • go.work is excluded by !**/*.work
📒 Files selected for processing (12)
  • .github/workflows/engine-module.yml
  • .github/workflows/fuzz.yml
  • .github/workflows/pr-validation.yml
  • .github/workflows/release.yml
  • .github/workflows/routine.yml
  • components/worker/internal/services/extract_crm_data.go
  • components/worker/internal/services/extract_crm_data_test.go
  • go.mod
  • pkg/engine/CHANGELOG.md
  • pkg/engine/go.mod
  • pkg/resolver/env_loader.go
  • pkg/resolver/env_loader_test.go

Comment on lines +15 to +40
// capturingLogger records every Log call so tests can assert on emitted
// warnings. It satisfies libLog.Logger; only Log is exercised here.
type capturingLogger struct {
entries []capturedEntry
}

type capturedEntry struct {
level libLog.Level
msg string
fields map[string]any
}

func (c *capturingLogger) Log(_ context.Context, level libLog.Level, msg string, fields ...libLog.Field) {
m := make(map[string]any, len(fields))
for _, f := range fields {
m[f.Key] = f.Value
}

c.entries = append(c.entries, capturedEntry{level: level, msg: msg, fields: m})
}

func (c *capturingLogger) With(_ ...libLog.Field) libLog.Logger { return c }
func (c *capturingLogger) WithGroup(_ string) libLog.Logger { return c }
func (c *capturingLogger) Enabled(_ libLog.Level) bool { return true }
func (c *capturingLogger) Sync(_ context.Context) error { return nil }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the target test file and nearby test utilities/mocks.
git ls-files 'pkg/resolver/*' 'pkg/**/*mock.go' 'pkg/**/*_test.go' | sed -n '1,200p'

printf '\n--- env_loader_test.go ---\n'
cat -n pkg/resolver/env_loader_test.go | sed -n '1,220p'

printf '\n--- search for libLog.Logger mocks / mockgen directives ---\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/vendor/**' 'mockgen|go:generate.*mockgen|type .*Logger.*interface|libLog\.Logger|capturingLogger' pkg . | sed -n '1,240p'

printf '\n--- relevant resolver tests around empty-name assertion ---\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/vendor/**' 'config_name|empty-name|name.*empty|warning' pkg/resolver -A4 -B4 | sed -n '1,240p'

Repository: LerianStudio/fetcher

Length of output: 50376


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n--- pkg/testutil/mocks.go ---\n'
cat -n pkg/testutil/mocks.go | sed -n '1,220p'

printf '\n--- pkg/resolver/resolver.mock.go ---\n'
cat -n pkg/resolver/resolver.mock.go | sed -n '1,220p'

printf '\n--- env_loader_test.go empty-name coverage and logger usage ---\n'
rg -n --context 4 'config_name|capturingLogger|LoadInternalConnectionsFromEnv|warn|warning|empty' pkg/resolver/env_loader_test.go | sed -n '1,240p'

Repository: LerianStudio/fetcher

Length of output: 16886


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n--- pkg/resolver/env_loader.go ---\n'
cat -n pkg/resolver/env_loader.go | sed -n '1,260p'

printf '\n--- env_loader_test.go around the empty-name test block ---\n'
cat -n pkg/resolver/env_loader_test.go | sed -n '260,360p'

Repository: LerianStudio/fetcher

Length of output: 11820


Assert the empty CONFIG_NAME path stays silent. assert.NotEqual(t, "", e.fields["config_name"]) still passes if this path starts logging a non-empty config name; assert.Empty(t, logger.entries) would lock the intended skip behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/resolver/env_loader_test.go` around lines 15 - 40, Update the test
covering the empty CONFIG_NAME path to assert that capturingLogger.entries is
empty, ensuring no log is emitted when configuration loading is skipped. Retain
the existing field assertions for paths that do log, and use the capturingLogger
implementation to verify silence.

Source: Coding guidelines

Comment on lines +316 to +319
for _, e := range logger.entries {
assert.NotEqual(t, "", e.fields["config_name"],
"empty CONFIG_NAME must be skipped before any log is emitted")
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert that no log entries were emitted.

This only rejects entries with an empty config_name; a warning without that field would still pass despite violating the silent-skip contract.

Proposed fix
-	for _, e := range logger.entries {
-		assert.NotEqual(t, "", e.fields["config_name"],
-			"empty CONFIG_NAME must be skipped before any log is emitted")
-	}
+	assert.Empty(t, logger.entries,
+		"empty CONFIG_NAME must be skipped before any log is emitted")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
for _, e := range logger.entries {
assert.NotEqual(t, "", e.fields["config_name"],
"empty CONFIG_NAME must be skipped before any log is emitted")
}
assert.Empty(t, logger.entries,
"empty CONFIG_NAME must be skipped before any log is emitted")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/resolver/env_loader_test.go` around lines 316 - 319, Update the
assertions in the logger.entries verification to require that no log entries are
emitted when CONFIG_NAME is empty, rather than checking only each entry’s
config_name field. Preserve the existing test setup and silent-skip contract
while asserting logger.entries is empty.

Back-merge the 3.0.x hotfix line (CRM regulatory_fields decryption, #320) and
release chores (3.0.1, 3.0.2) into the 3.1.0-beta line so release-candidate
promotes to main without conflicts. Resolutions: go.mod/go.sum kept from
release-candidate (newer, CI-green dependency pair); pkg/engine/CHANGELOG.md
unioned to preserve both stable (1.1.1/1.1.0) and beta (1.1.0-beta.x) entries.

Claude-Session: https://claude.ai/code/session_01WscfYUmQmJ7KWNGE18mXNB
@lerian-studio

Copy link
Copy Markdown
Contributor

🔴 Lerian Library Version Check — action required

Library Current Latest Status
lib-auth/v2 v2.9.0 v2.9.0 ✅ Current
lib-commons/v5 v5.10.0 v5.10.0 ✅ Current
lib-observability v1.1.0 v2.1.0 🕒 Grace (major bump, expires 2026-07-25)
lib-streaming v1.8.0 v1.9.0 🔴 Needs update
fetcher/pkg/engine v1.1.0-beta.2 skipped ⏭️ Skipped — ignore file · why?

✅ 2 current · 🔴 1 needs update · 🕒 1 in grace · ⏭️ 1 skipped · ⚠️ 0 unknown

Bump the outdated libraries, or add temporary entries to .lerianstudiolibignore.
🕒 1 major bump(s) are within the grace period. The grace period applies to major bumps only and lasts 3 days — bump them before it expires, or the check will start failing.

@lerian-studio lerian-studio added size/M PR changes 200-499 lines area: documentation Documentation and markdown content area: ci/cd GitHub Actions workflows and release configuration area: tests Unit, integration and end-to-end tests area: pkg Reusable public packages area: dependencies Go module dependencies labels Jul 24, 2026
@lerian-studio

Copy link
Copy Markdown
Contributor

🔍 PR Validation Summary

✅ PR Mergeable — no blocking failures

Check Status Blocking
Source Branch ✅ success yes
PR Title ✅ success yes
PR Description ✅ success yes
PR Size ✅ success no
Auto Labels ✅ success no
PR Metadata ✅ success no

🔍 View workflow run

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/engine/CHANGELOG.md (1)

13-20: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Place the new beta releases at the top of the changelog.

The release script prepends new entries immediately after the title, but these 3.1.0-beta.* entries appear below older releases. Move 1.1.0-beta.2 first, followed by 1.1.0-beta.1, before 1.1.1 so the changelog matches the release pipeline’s ordering contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/engine/CHANGELOG.md` around lines 13 - 20, Reorder the release entries in
the pkg/engine changelog so 1.1.0-beta.2 appears first, followed by
1.1.0-beta.1, both immediately before the existing 1.1.1 entry. Preserve each
release’s existing text and formatting.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@pkg/engine/CHANGELOG.md`:
- Around line 13-20: Reorder the release entries in the pkg/engine changelog so
1.1.0-beta.2 appears first, followed by 1.1.0-beta.1, both immediately before
the existing 1.1.1 entry. Preserve each release’s existing text and formatting.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 38125910-617c-4f6d-8e45-691f62fd0366

📥 Commits

Reviewing files that changed from the base of the PR and between f68ff94 and f42efd6.

📒 Files selected for processing (1)
  • pkg/engine/CHANGELOG.md

@lerian-studio

Copy link
Copy Markdown
Contributor

🔒 Security Scan Results — manager

🚫 PR Blocked — 3 blocking findings

Stage Status Blocking?
Filesystem Scan ✅ Clean
Docker Image Scan ⚠️ 1 finding 🔴 Yes
Docker Hub Health Score ⚠️ 1 finding 🔴 Yes
Pre-release Version Check ⚠️ 1 finding 🔴 Yes

Trivy

Filesystem Scan

✅ No vulnerabilities or secrets found.

Docker Image Scan

Severity Vulnerability Title
CRITICAL/HIGH GHSA-hrxh-6v49-42gf gRPC-Go: xDS RBAC and HTTP/2 Vulnerabilities

Docker Hub Health Score Compliance

⚠️ Policies — 3/4 met

Policy Status
Default non-root user ✅ Passed
No fixable critical/high CVEs ⚠️ Failed
No high-profile vulnerabilities ✅ Passed
No AGPL v3 licenses ✅ Passed

⚠️ Some Docker Hub health score policies are not met. Review the table above.


Pre-release Version Check

🚫 Found 1 unstable version pin(s). Only stable releases (x.y.z) and SHA-based pins are allowed.

File Line Content
./go.mod 68 github.com/LerianStudio/fetcher/pkg/engine v1.1.0-beta.2

Replace pre-release suffixes (-alpha, -beta, -rc, -dev, etc.) with stable releases.


🔍 View full scan logs

@lerian-studio

Copy link
Copy Markdown
Contributor

📊 Unit Test Coverage Report: fetcher-manager

Metric Value
Overall Coverage 89.7% ✅ PASS
Threshold 80%

Coverage by Package

Package Coverage
github.com/LerianStudio/fetcher/v2/components/manager/cmd/huma-spec 33.4%
github.com/LerianStudio/fetcher/v2/components/manager/internal/adapters/cache 100.0%
github.com/LerianStudio/fetcher/v2/components/manager/internal/adapters/http/in 89.4%
github.com/LerianStudio/fetcher/v2/components/manager/internal/services/command 92.8%
github.com/LerianStudio/fetcher/v2/components/manager/internal/services/query 96.4%

Generated by Go PR Analysis workflow

@lerian-studio

Copy link
Copy Markdown
Contributor

📊 Unit Test Coverage Report: fetcher-worker

Metric Value
Overall Coverage 87.4% ✅ PASS
Threshold 80%

Coverage by Package

Package Coverage
github.com/LerianStudio/fetcher/v2/components/worker/internal/services 90.0%

Generated by Go PR Analysis workflow

@lerian-studio

Copy link
Copy Markdown
Contributor

🔒 Security Scan Results — worker

🚫 PR Blocked — 3 blocking findings

Stage Status Blocking?
Filesystem Scan ✅ Clean
Docker Image Scan ⚠️ 1 finding 🔴 Yes
Docker Hub Health Score ⚠️ 1 finding 🔴 Yes
Pre-release Version Check ⚠️ 1 finding 🔴 Yes

Trivy

Filesystem Scan

✅ No vulnerabilities or secrets found.

Docker Image Scan

Severity Vulnerability Title
CRITICAL/HIGH GHSA-hrxh-6v49-42gf gRPC-Go: xDS RBAC and HTTP/2 Vulnerabilities

Docker Hub Health Score Compliance

⚠️ Policies — 3/4 met

Policy Status
Default non-root user ✅ Passed
No fixable critical/high CVEs ⚠️ Failed
No high-profile vulnerabilities ✅ Passed
No AGPL v3 licenses ✅ Passed

⚠️ Some Docker Hub health score policies are not met. Review the table above.


Pre-release Version Check

🚫 Found 1 unstable version pin(s). Only stable releases (x.y.z) and SHA-based pins are allowed.

File Line Content
./go.mod 68 github.com/LerianStudio/fetcher/pkg/engine v1.1.0-beta.2

Replace pre-release suffixes (-alpha, -beta, -rc, -dev, etc.) with stable releases.


🔍 View full scan logs

@fredcamaral
fredcamaral merged commit 3cd9c60 into main Jul 24, 2026
40 of 45 checks passed
@mintlify

mintlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Docs PR opened: https://github.com/lerianstudio/documentation/pull/193

The Fetcher configuration page now states that unknown DATASOURCE _CONFIG_NAME values are skipped with a WARN log naming the accepted set.

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

Labels

area: ci/cd GitHub Actions workflows and release configuration area: dependencies Go module dependencies area: documentation Documentation and markdown content area: pkg Reusable public packages area: tests Unit, integration and end-to-end tests size/M PR changes 200-499 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DATASOURCE_*_CONFIG_NAME outside the internal registry is silently skipped at startup (no log)

4 participants