Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 131 additions & 27 deletions .github/workflows/ci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 25 additions & 2 deletions .github/workflows/ci.yml.genie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,28 @@ const failureReminderStep = {
].join('\n'),
} as const

/**
* Verify the lock-pinned devenv rev emits OTEL shell-entry messages under a real PTY.
* `--no-reload` keeps the probe on the post-init shell-output path we care about
* without exercising the separate interactive reload loop, which currently
* panics on the pinned upstream commit.
*/
const verifyOtelShellEntryStep = {
name: 'Verify OTEL shell entry',
shell: 'bash' as const,
run: [
runDevenvTasksBefore('otel:test'),
'command -v script >/dev/null 2>&1',
'tmp_log="$(mktemp)"',
`printf 'printf "OTEL_MODE=%%s\\n" "$OTEL_MODE"\nprintf "OTEL_GRAFANA_LINK_URL=%%s\\n" "$OTEL_GRAFANA_LINK_URL"\nexit\n' | script -qefc '"${'${DEVENV_BIN:?DEVENV_BIN not set}'}" shell --no-reload' "$tmp_log"`,
"grep -q '\\[otel\\] Using .* OTEL stack' \"$tmp_log\"",
"grep -q '\\[otel\\] Start with: devenv up' \"$tmp_log\"",
"grep -q '^OTEL_MODE=' \"$tmp_log\"",
"grep -q '^OTEL_GRAFANA_LINK_URL=http' \"$tmp_log\"",
'rm -f "$tmp_log"',
].join('\n'),
} as const

/**
* Temporary diagnostics summary for #272.
* Remove once #201/#272 are root-caused and we can return to a minimal CI flow.
Expand Down Expand Up @@ -113,7 +135,7 @@ const nixDiagnosticsSummaryStep = {
].join('\n'),
} as const

const job = (step: { name: string; run: string; shell?: string }) => ({
const job = (step: { name: string; run: string }, extraSteps: readonly any[] = []) => ({
'runs-on': namespaceRunner({
profile: 'namespace-profile-linux-x86-64',
runId: '${{ github.run_id }}',
Expand All @@ -122,6 +144,7 @@ const job = (step: { name: string; run: string; shell?: string }) => ({
env: standardCIEnv,
steps: [
...baseSteps,
...extraSteps,
step,
savePnpmStateStep(),
nixDiagnosticsSummaryStep,
Expand Down Expand Up @@ -187,7 +210,7 @@ const jobs: Record<CIJobName, ReturnType<typeof job> | ReturnType<typeof multiPl
typecheck: job({
name: 'Type check',
run: runDevenvTasksBefore('ts:check:strict'),
}),
}, [verifyOtelShellEntryStep]),
lint: job({
name: 'Format + lint',
run: runDevenvTasksBefore('lint:check'),
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tmp

# Node.js
node_modules
.pnpm-store

# TypeScript
*.tsbuildinfo
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ All notable changes to this project will be documented in this file.
- Unblocks composed-root `pnpm-workspace.yaml` generation in downstream megarepos that import `@overeng/utils`
- **@overeng/genie**: Use cwd-relative lock directory instead of shared `/tmp/genie-locks/` to fix `EACCES` errors in multi-user CI environments (#520)
- **@overeng/tui-react**: Format timeline timestamps as human-readable durations (e.g. `6m 18s / 16m 21s`) instead of raw seconds (`377.9s / 980.6s`) in `TuiStoryPreview` (#472)
- **devenv/tasks**: make warm shell bootstrap commit-scoped and remove `ts:emit` from shell entry
- Adds an outer `setup:auto` cache so warm `devenv shell` skips unchanged bootstrap work instead of traversing `pnpm:install`, `genie:run`, and `mr:apply` on every entry
- Switches shell bootstrap from `mr:sync` to initial `mr:apply` so a fresh worktree is normalized without fetching on every shell
- Replaces setup fingerprint tool-version probes with resolved tool-identity hashing so warm shells do not pay `pnpm`, `genie`, or `mr` CLI startup just to validate unchanged setup inputs
- Speeds up warm task status paths by using direct `mr status`, fingerprint-based `genie:run` caching, a one-process `pnpm:install` projection hash that preserves the previous structural guarantees, and a `ts:emit` graph that excludes `noEmit` references at emit time
- Hardens the fast paths by making the outer cache only track setup inputs while each task still verifies its own outputs before skipping
- **devenv/otel**: update `devenv` to the upstream `v2.1` tag and move OTEL shell-entry notices onto `devenv.messages`
- Resolves OTEL mode, dashboard sync, and Grafana trace-link construction in a dedicated shell-entry task instead of ad-hoc `enterShell` output
- Auto-displays the OTEL shell-entry message through upstream task messages while keeping `otel-trace` as a lightweight re-open helper
- Scrubs ambient task trace context before emitting `devenv/shell:entry` so the shell root span cannot self-parent or collide with later `dt` root spans
- Emits `devenv/shell:entry` via the pinned store path for `otel-span` so tracing still works before `enterShell` PATH mutations are fully visible
- **@overeng/genie**: Validate GitHub Actions `runs-on` labels before emitting workflow YAML
- Fails `genie` when workflow jobs serialize non-string, empty, or stale placeholder runner labels like `null` / `...=undefined`
- Prevents CI helper API drift from silently generating invalid workflow files that only fail later in GitHub Actions
Expand Down
4 changes: 2 additions & 2 deletions context/otel.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dt pnpm:install
dt check:quick

# 4. View traces
otel-trace # clickable trace URL for the current shell session
otel-trace # re-open the current shell session's trace URL
open $OTEL_GRAFANA_URL # Grafana UI -> Explore -> Tempo
```

Expand Down Expand Up @@ -93,7 +93,7 @@ otel-trace | cat # plain text: trace:<trace-id> <url>

The function parses `TRACEPARENT` (W3C format: `version-traceId-spanId-traceFlags`) and constructs a Grafana Explore URL from `OTEL_GRAFANA_LINK_URL`.

**Note:** Auto-display of the trace URL on shell entry is blocked by devenv's PTY task runner (`drain_pty_to_vt`), which consumes all shell output before the interactive session starts. Tracked upstream in [cachix/devenv#2500](https://github.com/cachix/devenv/issues/2500).
**Note:** This repo now uses `devenv.messages` to auto-display the OTEL shell-entry notice. `otel-trace` remains as an on-demand way to reopen the same link later in the session. The repo is temporarily pinned to the upstream post-[cachix/devenv#2661](https://github.com/cachix/devenv/pull/2661) commit while waiting for the next tagged release.

### `otel-span` -- Trace span CLI

Expand Down
Loading
Loading