Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

release: corporate hardening closure for CLI delivery#21

Merged
devzucca merged 30 commits intomainfrom
dev
Mar 21, 2026
Merged

release: corporate hardening closure for CLI delivery#21
devzucca merged 30 commits intomainfrom
dev

Conversation

@devzucca
Copy link
Copy Markdown
Owner

Summary

  • finaliza hardening de workflow CLI (publish gates + compatibilidad windows para cobertura)
  • corrige drift de formato gofmt y asercion de test de integracion en macOS
  • alinea skills/documentacion con politica de verificacion SHA-256 obligatoria
  • confirma trazabilidad de configuracion multi-proyecto y aliases Supabase

Validation

  • go test ./... (cli) en verde
  • AppLogger CLI - Build & Test en verde sobre head previo de dev
  • CI en progreso para el ultimo commit de alineacion documental

Corporate readiness checklist

  • Build y test multi-OS estables
  • Instaladores bash/powershell endurecidos (checksum/retry/timeout/version pin)
  • Contrato CLI-agente y health/capabilities documentado
  • Configuracion Supabase y modelo multi-proyecto documentados
  • Skills operativos alineados con comportamiento real

devzucca added 28 commits March 19, 2026 12:27
… internally

go.mod declared go 1.25 but golangci-lint-action's bundled toolchain is go1.24,
causing 'package requires newer Go version go1.25' typecheck errors in CI.

Go 1.25 has not been officially released yet. Downgrade to go 1.24 (latest stable)
so golangci-lint can typecheck successfully in all CI jobs.
Previous 0.1.1-alpha.2 release workflow published partial artifacts to GitHub
Packages (logger-core and logger-test) before being cancelled. A second attempt
returned HTTP 409 Conflict on those modules, leaving the release incomplete.

This bump avoids touching any already-published package version.

Changes:
- sdk/gradle.properties: VERSION_NAME 0.1.1-alpha.2 -> 0.1.1-alpha.3
- sdk/gradle/libs.versions.toml: applogger version constant
- sdk/build.gradle.kts: fallback version literals (x2)
- sdk/scripts/publish.gradle.kts: fallback version literal
- sdk/logger-core/.../AppLoggerVersion.kt: runtime NAME constant
- sdk/AppLogger.podspec: CocoaPods version
- sdk/Package.swift: SPM remote URL comment
- sdk/sample/build.gradle.kts: commented-out dependency examples
- sdk/logger-transport-supabase/.../SupabaseE2ETest.kt: test fixture appVersion
- README.md + 10 docs/ES/** files: integration snippets and version headers

Pre-push verified:
- Zero residual 0.1.1-alpha.2 references in any tracked source file
- Kotlin JVM compilation: BUILD SUCCESSFUL
- SDK ./gradlew check: BUILD SUCCESSFUL (185 tasks)
- E2E test: guarded by @EnabledIfEnvironmentVariable, safe without secrets
- cli/.golangci.yaml local drift (go: 1.25) discarded before commit
…functions

Props 1-4 of SDK improvement plan:
- Prop 1+2: Add throwable: Throwable? = null to debug(), info(), warn() for
  optional stacktrace capture at non-critical log levels
- Prop 3: Map<String,Any>? extra already existed in all methods (confirmed, no changes)
- Prop 4: New AppLoggerExtensions.kt in commonMain with:
  - AppLogger.logD/I/W/E/C() shorthands
  - Any.logD/I/W/E/C(logger, ...) extensions with auto-inferred tag from class name
  - Any.logTag() helper for consistent tag derivation

warn() signature change: throwable inserted before anomalyType (all existing
call-sites use named params -- zero breaking changes confirmed)

All implementations updated: AppLoggerImpl, AppLoggerSDK (Android),
AppLoggerIos, NoOpLogger, InMemoryLogger, NoOpTestLogger

Also includes docs/skills anti-hallucination hardening:
- Canonical imports anchored (com.applogger.core.*, SupabaseTransport)
- com.applogger.sdk.* explicitly prohibited in 4 skill files
- Logcat condition documented: isDebugMode && consoleOutput (exact truth)
- README snippets aligned with BuildConfig.LOGGER_DEBUG + consoleOutput

BUILD SUCCESSFUL; JVM tests pass
architecture.md:
- AppLogger trait: debug/info/warn signatures updated (+ throwable param)
- warn() parameter order: throwable inserted before anomalyType
- AppLoggerSDK delegations: debug/info/warn updated
- NoOpLogger overrides: debug/info/warn updated
- Added AppLoggerExtensions.kt to commonMain module tree
- Added section 4.1.1 documenting logD/I/W/E/C extensions + Any.logX() pattern

integration-guide.md:
- Section 5.1: added throwable examples for debug/info/warn calls
- New section 5.2: extension functions with auto-inferred tag (Any.logX)
- Renumbered 5.2→5.3 (level guide) and 5.3→5.4 (best practices)

CHANGELOG.md:
- [Unreleased] ### Added: throwable overloads + AppLoggerExtensions entries

README.md:
- Quick-start: throwable usage shown for debug/info/warn
- Quick-start: extension functions example added (this.logE / this.logW)
…xtensions

instrumentation-design/SKILL.md:
- Constraint 4: document that all log levels accept throwable? param
- Constraint 5: recommend Any.logX(logger) extensions for classes with injected logger

applogger-project-integration/references/integration-playbook.md:
- Line 15: reference AppLoggerExtensions (Any.logD/I/W/E/C) as KMP commonMain pattern

applogger-runtime-troubleshooting/references/common-failures.md:
- Failure 9: warn() positional trap (throwable vs anomalyType order) — use named params
AppLoggerImplTest:
- debug throwable captured in throwableInfo (debug mode)
- info throwable captured in throwableInfo
- warn throwable captured alongside anomalyType in extra
- debug without throwable produces null throwableInfo

InMemoryLoggerTest:
- debug/info/warn throwable captured in LogEntry
- null throwable results in null field (regression guard)

AppLoggerExtensionsTest (new, logger-core/jvmTest):
- logTag() returns simpleName; anonymous object returns 'Anonymous'
- AppLogger.logD/I/W/E/C shorthands delegate with correct level, tag, throwable, extra
- Any.logD/I/W/E/C infers tag from class name and propagates all params
- SpyLogger fixture follows RecordingTransport pattern used in AppLoggerImplTest
  (InMemoryLogger cannot be used here: logger-test depends on logger-core)

AppLoggerExtensions.kt:
- Fix KDoc code example: logI/logW/logE had missing tag argument (compile error)

All tests: BUILD SUCCESSFUL, check + assemble green
…--anomaly-type filter

- ci.yml: add 'chmod +x ./gradlew' step before first Gradle call in
  lint, test, e2e, and security jobs. Resolves exit-126 Permission
  Denied when running act on Windows (NTFS has no exec bits).
  No-op on real GitHub Actions Linux runners (gradlew is 100755 in git).

- release.yml: same chmod step in test and publish jobs.

- cli/telemetry_client.go: add 'extra' column to logs selectColumns
  so operators can read the full extra JSON (which includes anomaly_type
  stored by warn() calls). No change for metrics query.

- cli/telemetry.go: add --anomaly-type flag to both 'query' and
  'agent-response' subcommands. Filters on the PostgREST JSONB path
  extra->>anomaly_type. Only valid with --source=logs.
Copilot AI review requested due to automatic review settings March 21, 2026 06:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR finalizes “corporate hardening” for AppLogger delivery by tightening CLI release/install governance, expanding CLI configuration to support multi-project setups, and aligning the SDK + documentation to a new 0.1.1-alpha.3 release with improved throwable propagation and convenience extensions.

Changes:

  • CLI: adds multi-project resolution via JSON project profiles (--project/--config, APPLOGGER_PROJECT/APPLOGGER_CONFIG), anomaly-type filtering for logs, and hardened installers (SHA-256 mandatory, retries/timeouts) plus release governance gates.
  • SDK: bumps version to 0.1.1-alpha.3, adds optional throwable support to non-critical levels, introduces AppLoggerExtensions helpers, and generates AppLoggerVersion from VERSION_NAME.
  • Docs/skills/workflows: extensive updates to reflect new env/property keys, install flow, and stricter CI/release behavior.

Reviewed changes

Copilot reviewed 66 out of 96 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
sdk/scripts/publish.gradle.kts Uses resolved group/version defaults
sdk/sample/build.gradle.kts Supports underscore + dotted props
sdk/logger-transport-supabase/src/jvmTest/kotlin/com/applogger/transport/supabase/SupabaseE2ETest.kt Env var alias support + version bump
sdk/logger-test/src/jvmTest/kotlin/com/applogger/test/InMemoryLoggerTest.kt Tests throwable capture in entries
sdk/logger-test/src/commonMain/kotlin/com/applogger/test/NoOpTestLogger.kt Updates AppLogger signatures
sdk/logger-test/src/commonMain/kotlin/com/applogger/test/InMemoryLogger.kt Records throwable for debug/info/warn
sdk/logger-core/src/jvmTest/kotlin/com/applogger/core/internal/AppLoggerImplTest.kt Tests throwable propagation to events
sdk/logger-core/src/jvmTest/kotlin/com/applogger/core/AppLoggerExtensionsTest.kt New tests for extensions + tagging
sdk/logger-core/src/iosMain/kotlin/com/applogger/core/AppLoggerIos.kt Updates AppLogger signatures
sdk/logger-core/src/commonMain/kotlin/com/applogger/core/internal/NoOpLogger.kt Updates AppLogger signatures
sdk/logger-core/src/commonMain/kotlin/com/applogger/core/internal/AppLoggerImpl.kt Plumbs throwable into processing
sdk/logger-core/src/commonMain/kotlin/com/applogger/core/AppLoggerVersion.kt Removed (now generated)
sdk/logger-core/src/commonMain/kotlin/com/applogger/core/AppLoggerExtensions.kt New convenience + tag-inferring extensions
sdk/logger-core/src/commonMain/kotlin/com/applogger/core/AppLogger.kt Adds throwable params to debug/info/warn
sdk/logger-core/src/androidMain/kotlin/com/applogger/core/AppLoggerSDK.kt Updates AppLogger signatures
sdk/logger-core/build.gradle.kts Generates AppLoggerVersion from VERSION_NAME
sdk/gradle/libs.versions.toml Updates applogger version to alpha.3
sdk/gradle.properties Bumps VERSION_NAME to alpha.3
sdk/build.gradle.kts Centralizes group/version defaults
sdk/Package.swift Updates release URL comment
sdk/AppLogger.podspec Bumps pod version
local.properties.example Renames sample keys to underscore form
docs/ES/paquete/testing.md Version bump in doc header
docs/ES/paquete/publishing.md Version bump + tag examples
docs/ES/paquete/dev-environment.md Updates Supabase env var guidance
docs/ES/paquete/architecture.md Documents extensions + signature changes
docs/ES/paquete/README.md Updates integration snippet (debug flags)
docs/ES/paquete/CONTRIBUTING.md Version bump reference
docs/ES/paquete/CHANGELOG.md Notes throwable + extensions
docs/ES/desarrollo/monitoring-app.md Version bump reference
docs/ES/desarrollo/integration-guide.md Renames config keys + adds extensions section
docs/ES/desarrollo/api-compatibility.md Version bump reference
docs/ES/cli/references/BEST_PRACTICES.md Renames CLI env vars
docs/ES/cli/SUPABASE_CONFIGURATION.md Adds multi-project config model
docs/ES/cli/README.md Adds project selection + anomaly-type docs
docs/ES/cli/INSTALLATION.md Adds one-line installers + Go 1.24
docs/ES/agents/** Aligns skills with new keys/behavior
docs-investigation/investigation.md Renames config keys in examples
cli/tests/integration/contract_test.go Adds tests for anomaly-type + project profiles
cli/plugin-metadata.yaml Updates required/optional env var names
cli/internal/cli/telemetry_client.go Adds anomaly-type filtering + extra select
cli/internal/cli/telemetry_agent_response.go Includes project/config_source in agent payload
cli/internal/cli/telemetry.go Adds --anomaly-type flag + response context
cli/internal/cli/supabase.go Adds project-config loading + env aliases
cli/internal/cli/root.go Adds global --project/--config
cli/internal/cli/project_config.go New project-profile resolver
cli/internal/cli/health.go Exposes resolved project/config source
cli/internal/cli/capabilities.go Adds config input modes
cli/internal/cli/agent.go Updates agent schema env vars + guidance
cli/install/install.sh New hardened bash installer
cli/install/install.ps1 New hardened PowerShell installer
cli/go.mod Downgrades toolchain to Go 1.24
cli/VERSION Adds CLI version source of truth
cli/README.md Documents installers + multi-project mode
README.md Documents versioning rules + updates snippets
CHANGELOG.md Records CLI governance + distribution hardening
.markdownlint.jsonc Adds repository markdownlint policy
.github/workflows/release.yml Ensures gradlew executable in CI
.github/workflows/ci.yml Ensures gradlew executable in CI
.github/workflows/applogger-cli.yml Adds tag builds, governance, pinned gosec, installers/manifests
.act.secrets.example Adds lowercase supabase URL secret example

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +31 to +41
fun debug(tag: String, message: String, throwable: Throwable? = null, extra: Map<String, Any>? = null)

/**
* Logs an informational message.
*
* @param tag Short identifier for the source.
* @param message Human-readable description.
* @param throwable Optional exception whose stack trace will be captured.
* @param extra Optional key-value metadata.
*/
fun info(tag: String, message: String, extra: Map<String, Any>? = null)
fun info(tag: String, message: String, throwable: Throwable? = null, extra: Map<String, Any>? = null)
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

Changing the debug/info signatures by inserting throwable before extra is source-breaking for callers that previously passed extra positionally as the 3rd argument (common in Kotlin/Java interop). Consider preserving the old overloads (delegating to the new API) or moving the new parameter to the end to keep positional call sites compiling.

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +58
fun warn(
tag: String,
message: String,
throwable: Throwable? = null,
anomalyType: String? = null,
extra: Map<String, Any>? = null
)
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

warn() now inserts throwable before anomalyType. This breaks positional calls like warn(tag, msg, "TYPE") and is especially risky for Java callers (no named args). To avoid a breaking change, keep the old parameter order via an overload/default implementation, or append the new throwable parameter instead of inserting it in the middle.

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +18
val sdkVersionName = providers.gradleProperty("VERSION_NAME").orElse("0.0.0-dev")
val generatedVersionDir = layout.buildDirectory.dir("generated/version/commonMain/kotlin")

val generateAppLoggerVersion by tasks.registering {
val outDir = generatedVersionDir.get().asFile
outputs.dir(outDir)

Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

generateAppLoggerVersion declares outputs but no inputs tied to VERSION_NAME, so Gradle may treat the task as up-to-date even when VERSION_NAME changes (stale generated AppLoggerVersion.kt). Add an inputs.property(...) for the resolved version (and ideally declare the output file) so incremental builds regenerate correctly.

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +15
- `throwable: Throwable? = null` opcional en `debug()` e `info()` — permite capturar stack traces
en niveles no-críticos sin cambios breaking en call-sites existentes.
- `throwable: Throwable? = null` opcional en `warn()` — parámetro insertado antes de `anomalyType`;
todas las llamadas existentes con named params no se ven afectadas.
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

The changelog claims the new optional throwable parameters introduce “sin cambios breaking”, but the public API changed parameter positions (notably warn() inserting a new parameter). This is breaking for consumers using positional arguments or implementing AppLogger. Please adjust the entry to describe the compatibility impact accurately (or add overloads to truly keep it non-breaking).

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +18
val loggerUrl = project.findProperty("appLogger_url")
?: project.findProperty("appLogger.url")
?: ""
val loggerKey = project.findProperty("appLogger_anonKey")
?: project.findProperty("appLogger.anonKey")
?: ""
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

project.findProperty(...) won’t pick up values from local.properties (which is the config mechanism referenced throughout the repo docs). If the intent is to source these from local.properties, load it explicitly (e.g., via a Properties read) or use the Android/Gradle helper that reads local.properties; otherwise, document that these must be provided via Gradle properties (-P or gradle.properties).

Copilot uses AI. Check for mistakes.
@devzucca devzucca merged commit ffa50a1 into main Mar 21, 2026
21 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants