Two categories of predefined variables are now injected automatically:
1. Always-available (CI=true, GITLAB_CI=true): set at lowest priority for
every non-empty context so that rules:if: expressions like '$CI == "true"'
evaluate correctly without requiring --var.
2. MR-specific (CI_MERGE_REQUEST_IID, CI_MERGE_REQUEST_SOURCE_BRANCH_NAME,
CI_MERGE_REQUEST_TARGET_BRANCH_NAME, …): injected as placeholder values
when --source merge_request_event is given, so MR-gated jobs evaluate
as active rather than silently skipped. CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
is derived from --branch when provided.
All injected defaults are non-pinned: --var overrides them, and pipeline
variables: blocks can also override via Inject(). The empty context (no
flags at all) is unchanged — no predefined vars are injected.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Added comprehensive table-driven test suites for all packages:
cmd/glint, cicontext, fetcher, graph, linter, model, resolver.
Coverage reaches 98%+ statement coverage across the codebase.
- Replaced os.Exit calls in cmd/glint with an `exit` variable so tests
can capture exit codes without terminating the test process.
- Removed unreachable code found during coverage analysis:
dead guard in cicontext.parseRegexLiteral; dead len(jobs)==0 branch
in graph.Pipeline; skipWin struct field and dead continue in
graph.convertToPNG; pipelineSVG return type simplified to string.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>