Skip to content

refactor: replace context.TODO() with context.Background() and harden CI/CD - #26

Merged
Patel230 merged 2 commits into
mainfrom
chore/context-background-and-ci-hardening
Jun 12, 2026
Merged

refactor: replace context.TODO() with context.Background() and harden CI/CD#26
Patel230 merged 2 commits into
mainfrom
chore/context-background-and-ci-hardening

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Summary

  • Replace all context.TODO() calls in production and test code with context.Background() (validator, quality_gate, codegraph, chat_welcome, dx)
  • Enable shadow and nilness govet linters; re-enable select staticcheck checks (SA4006, S1011, S1034)
  • Fix CI coverage threshold comment to match actual 60% check
  • Extract markdownlint config to .markdownlint-cli2.jsonc (both hawk and eyrie)
  • Pin actions/setup-go to SHA in setup-deps and hawk actions
  • Change setup-deps default branch from dev to main
  • Add tracking issue references to all t.Skip() calls lacking them

Context

All changes address improvements identified during a comprehensive codebase review. These are safe refactors with no behavioral changes.

… CI/CD

- Replace all context.TODO() calls in production and test code
  with context.Background() or proper context propagation
- Enable shadow and nilness govet linters; re-enable select
  staticcheck checks (SA4006, S1011, S1034)
- Fix CI coverage threshold comment (50% -> 60%)
- Extract markdownlint config to .markdownlint-cli2.jsonc
- Pin actions/setup-go to SHA in setup-deps and hawk actions
- Change setup-deps default branch from dev to main
- Add tracking issue references to all t.Skip() calls
@Patel230 Patel230 added the enhancement New feature or request label Jun 12, 2026
This commit resolves all 145 golangci-lint issues that surfaced when the
shadow, nilness, and additional staticcheck checks were enabled:

- 142 shadow (govet): renamed inner shadowed variables to context-specific
  names (statErr, writeErr, unmarshalErr, etc.)
- 22 model/provider shadows: renamed to modelName/providerName
- 2 nilness tautologies (non-nil != nil): removed redundant nil checks
- 1 staticcheck SA4006 (unused value): removed dead assignment

No function signatures, exported types, or behavior changed. No linters
were disabled or skipped. .golangci.yml is unchanged.

Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
@Patel230
Patel230 merged commit d1bf315 into main Jun 12, 2026
18 checks passed
@Patel230
Patel230 deleted the chore/context-background-and-ci-hardening branch June 12, 2026 10:34
Patel230 added a commit that referenced this pull request Jun 12, 2026
* refactor: replace context.TODO() with context.Background() and harden CI/CD

- Replace all context.TODO() calls in production and test code
  with context.Background() or proper context propagation
- Enable shadow and nilness govet linters; re-enable select
  staticcheck checks (SA4006, S1011, S1034)
- Fix CI coverage threshold comment (50% -> 60%)
- Extract markdownlint config to .markdownlint-cli2.jsonc
- Pin actions/setup-go to SHA in setup-deps and hawk actions
- Change setup-deps default branch from dev to main
- Add tracking issue references to all t.Skip() calls

* refactor: centralize env access via internal/env package

- Create internal/env/env.go with zero-dependency Getenv wrapper
- Update config.Getenv to delegate to env.Getenv
- Migrate os.Getenv calls across internal/ to env.Getenv or config.Getenv
- Update AGENTS.md policy: env.Getenv for simple reads,
  config.EnvManager for profile/secret management
- Add exceptions for runtime probes and telemetry

* fix: resolve 145 golangci-lint shadow and nilness issues

This commit resolves all 145 golangci-lint issues that surfaced when the
shadow, nilness, and additional staticcheck checks were enabled:

- 142 shadow (govet): renamed inner shadowed variables to context-specific
  names (statErr, writeErr, unmarshalErr, etc.)
- 22 model/provider shadows: renamed to modelName/providerName
- 2 nilness tautologies (non-nil != nil): removed redundant nil checks
- 1 staticcheck SA4006 (unused value): removed dead assignment

No function signatures, exported types, or behavior changed. No linters
were disabled or skipped. .golangci.yml is unchanged.

Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
Patel230 added a commit that referenced this pull request Jun 15, 2026
… CI/CD (#26)

* refactor: replace context.TODO() with context.Background() and harden CI/CD

- Replace all context.TODO() calls in production and test code
  with context.Background() or proper context propagation
- Enable shadow and nilness govet linters; re-enable select
  staticcheck checks (SA4006, S1011, S1034)
- Fix CI coverage threshold comment (50% -> 60%)
- Extract markdownlint config to .markdownlint-cli2.jsonc
- Pin actions/setup-go to SHA in setup-deps and hawk actions
- Change setup-deps default branch from dev to main
- Add tracking issue references to all t.Skip() calls

* fix: resolve 145 golangci-lint shadow and nilness issues

This commit resolves all 145 golangci-lint issues that surfaced when the
shadow, nilness, and additional staticcheck checks were enabled:

- 142 shadow (govet): renamed inner shadowed variables to context-specific
  names (statErr, writeErr, unmarshalErr, etc.)
- 22 model/provider shadows: renamed to modelName/providerName
- 2 nilness tautologies (non-nil != nil): removed redundant nil checks
- 1 staticcheck SA4006 (unused value): removed dead assignment

No function signatures, exported types, or behavior changed. No linters
were disabled or skipped. .golangci.yml is unchanged.

Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
Patel230 added a commit that referenced this pull request Jun 15, 2026
* refactor: replace context.TODO() with context.Background() and harden CI/CD

- Replace all context.TODO() calls in production and test code
  with context.Background() or proper context propagation
- Enable shadow and nilness govet linters; re-enable select
  staticcheck checks (SA4006, S1011, S1034)
- Fix CI coverage threshold comment (50% -> 60%)
- Extract markdownlint config to .markdownlint-cli2.jsonc
- Pin actions/setup-go to SHA in setup-deps and hawk actions
- Change setup-deps default branch from dev to main
- Add tracking issue references to all t.Skip() calls

* refactor: centralize env access via internal/env package

- Create internal/env/env.go with zero-dependency Getenv wrapper
- Update config.Getenv to delegate to env.Getenv
- Migrate os.Getenv calls across internal/ to env.Getenv or config.Getenv
- Update AGENTS.md policy: env.Getenv for simple reads,
  config.EnvManager for profile/secret management
- Add exceptions for runtime probes and telemetry

* fix: resolve 145 golangci-lint shadow and nilness issues

This commit resolves all 145 golangci-lint issues that surfaced when the
shadow, nilness, and additional staticcheck checks were enabled:

- 142 shadow (govet): renamed inner shadowed variables to context-specific
  names (statErr, writeErr, unmarshalErr, etc.)
- 22 model/provider shadows: renamed to modelName/providerName
- 2 nilness tautologies (non-nil != nil): removed redundant nil checks
- 1 staticcheck SA4006 (unused value): removed dead assignment

No function signatures, exported types, or behavior changed. No linters
were disabled or skipped. .golangci.yml is unchanged.

Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
Patel230 added a commit that referenced this pull request Jun 18, 2026
… CI/CD (#26)

* refactor: replace context.TODO() with context.Background() and harden CI/CD

- Replace all context.TODO() calls in production and test code
  with context.Background() or proper context propagation
- Enable shadow and nilness govet linters; re-enable select
  staticcheck checks (SA4006, S1011, S1034)
- Fix CI coverage threshold comment (50% -> 60%)
- Extract markdownlint config to .markdownlint-cli2.jsonc
- Pin actions/setup-go to SHA in setup-deps and hawk actions
- Change setup-deps default branch from dev to main
- Add tracking issue references to all t.Skip() calls

* fix: resolve 145 golangci-lint shadow and nilness issues

This commit resolves all 145 golangci-lint issues that surfaced when the
shadow, nilness, and additional staticcheck checks were enabled:

- 142 shadow (govet): renamed inner shadowed variables to context-specific
  names (statErr, writeErr, unmarshalErr, etc.)
- 22 model/provider shadows: renamed to modelName/providerName
- 2 nilness tautologies (non-nil != nil): removed redundant nil checks
- 1 staticcheck SA4006 (unused value): removed dead assignment

No function signatures, exported types, or behavior changed. No linters
were disabled or skipped. .golangci.yml is unchanged.

Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
Patel230 added a commit that referenced this pull request Jun 18, 2026
* refactor: replace context.TODO() with context.Background() and harden CI/CD

- Replace all context.TODO() calls in production and test code
  with context.Background() or proper context propagation
- Enable shadow and nilness govet linters; re-enable select
  staticcheck checks (SA4006, S1011, S1034)
- Fix CI coverage threshold comment (50% -> 60%)
- Extract markdownlint config to .markdownlint-cli2.jsonc
- Pin actions/setup-go to SHA in setup-deps and hawk actions
- Change setup-deps default branch from dev to main
- Add tracking issue references to all t.Skip() calls

* refactor: centralize env access via internal/env package

- Create internal/env/env.go with zero-dependency Getenv wrapper
- Update config.Getenv to delegate to env.Getenv
- Migrate os.Getenv calls across internal/ to env.Getenv or config.Getenv
- Update AGENTS.md policy: env.Getenv for simple reads,
  config.EnvManager for profile/secret management
- Add exceptions for runtime probes and telemetry

* fix: resolve 145 golangci-lint shadow and nilness issues

This commit resolves all 145 golangci-lint issues that surfaced when the
shadow, nilness, and additional staticcheck checks were enabled:

- 142 shadow (govet): renamed inner shadowed variables to context-specific
  names (statErr, writeErr, unmarshalErr, etc.)
- 22 model/provider shadows: renamed to modelName/providerName
- 2 nilness tautologies (non-nil != nil): removed redundant nil checks
- 1 staticcheck SA4006 (unused value): removed dead assignment

No function signatures, exported types, or behavior changed. No linters
were disabled or skipped. .golangci.yml is unchanged.

Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant