Repository navigation
Conversation
Contributor
|
Thanks @chhhee10 for your contribution to Failproof AI! 🙌 We'd love to discuss your PR and welcome you to our community. Discord: https://discord.befailproof.ai/ |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
OTEL is opt-in, per agent, through `failproofai otel enable <agent>`. Setup asked "Also send OpenTelemetry from agents?" after the agents step and then a second picker, on every interactive Cloud setup. That put an optional feature in the one flow every user runs, and it was the only question there that wasn't about the machine itself. Removed the step and its apply block, `chooseWizardOtel` and `OTEL_WIZARD_QUESTION`, and the HOME/selectOne plumbing only it used. The wizard is back to the four steps of config v2. Tests: one test now covers typed, unattended, token, oss and saved setup. It asserts that setup asks no extra question and never calls the OTEL command. A source check pins that the wizard doesn't import otel-cli. Checked: tsc and lint are clean. The full unit suite passes except two VS Code detection tests in otel.test.ts, which fail identically on the branch without this change.
Two tests emptied PATH to simulate "no VS Code", but vscodeInstalled also checks fixed system paths (/usr/share/code/code, /Applications/...). On any developer machine with VS Code installed they failed; CI passed only because its runners have no VS Code. The fixed locations move behind `vscodeProbe.appPaths`, a small seam the tests stub, with no change in behaviour. A new test pins that a fixed install location is still detected with nothing on PATH, and that the Linux list is unchanged. Checked: the full unit suite (8363) and e2e (359) pass on a machine with /usr/bin/code and /usr/share/code/code present. tsc and lint are clean. The audit fingerprint is unchanged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #881 (base
feat/tui-ux). Merge #881 first; then retarget this PR tomain.What changed
Opt-in OpenTelemetry setup and an opaque local OTLP relay for FailproofAI Cloud, plus optional TypeScript and Python SDK span exporters. This restack merges
feat/tui-uxintofeat/otelwithout rewriting history and ports OTEL into its new screen language and config v2.failproofai otel status|enable|disable|envsupports Claude Code, Codex, Gemini CLI and Copilot. Help uses the same usage/options/examples renderer as feat: the TUI redesign and config v2 (agent selection end to end) #881; reports use state dots, result glyphs and fix lines.envremains unstyled shell input.failproofai config. It is opt-in, per agent, throughfailproofai otel enable <agent>. An earlier revision added an optional wizard question; it was removed in 52020af, so setup is exactly config v2's four steps.agents: {selected, seen}remains the remembered tracing list. Existingcollector.agents.<agent>.sessions,otel.agents, andcollector.otlpsettings are retained and round-trip through v2 writes, preserving backward compatibility, transcript switching and exact recovery./v1/eventsuploader behavior changes.instrument("otel")and publicOtelSpanExporterremain optional in both SDKs: precise OTLP/JSON batches, lazy OpenTelemetry loading, zero hard runtime dependencies, and daemon delivery without a TCP listener.Why / dependency
OTEL is additive, opt-in and off by default. Cloud owns translation.
Paired server PR: https://github.com/FailproofAI/agenteye/pull/1062 — server merges/deploys FIRST. Both use
feat/otel; the server PR is stacked onfeat/cloud-redesign.Contract: OTLP/HTTP
/v1/traces,/v1/logs,/v1/metrics; existing Bearer API key withevents:add; orgotel.ingest_enabled(403 when off); optionalotel_ingestintrospection. Missing flags remain unknown, older-server 404s are parked/retained, and metrics are acknowledged only.Testing
codex execused a local Responses test provider; actual agent OTLP logs/traces/metrics reached the local capture server through the built daemon with correct Bearer authorization. No production keys or Cloud ingestion used. The relay works even withagents.selected: [].cargo test -p fpai-collectpassed, including config v2 + legacy OTEL compatibility.cargo test -p failproofaidandcargo test --workspacepassed, including all 8 config-v2 agent-selection E2E tests, all 7 unchanged collector-reload E2E tests, and all 3 OTLP relay E2E tests.cargo fmt --checkandcargo clippy --workspace --all-targets -- -D warningspassed.bun run buildpassed; final E2E rerun passed 353 tests, 6 skipped; final typecheck and lint passed (the same five existing warnings).baa504718dc9ad41/17eef7ee76c4c1fd); evidence intui-base-fingerprint.logandrestack-audit-fingerprint.log.76a749fd: all 35 checks passed, including the full CI workflow, supply-chain scan, real SDK integration shards and all four daemon platform builds. First new-base CI also passed ate5870a74. PR remains draft.mint broken-linksreports the existing 266 links in translated README files (README/license/contributing references), not the OTEL reference page; those translated README files are unchanged by this restack.Evidence:
/job/artifacts/restack-user-transcript.log,restack-user-capture.jsonl,restack-user-daemon.log,restack-wizard-pty.log,restack-restoration.json, and suite logs.Integration notes
Stacking replaces the old integration-time UX conflict. The merge commit preserves both branch histories. OTEL uses #881's new structure, instead of restoring its old wizard/help screens.
Restack-specific shared files:
bin/failproofai.mjs— OTEL index/help/report dispatch in the new kit.src/hooks/configure-wizard.ts— no OTEL step; identical to feat: the TUI redesign and config v2 (agent selection end to end) #881's four-step flow apart from comments. A test pins that no setup mode asks about or enables OTEL.src/hooks/fp-config.ts— documents the existing OTEL transcript overrides as orthogonal to v2 selection; reader/writer compatibility verified.__tests__/hooks/configure-wizard.test.ts,__tests__/hooks/otel.test.ts— setup never asks about or enables OTEL (typed/unattended/token/oss/saved); VS Code detection tests stubvscodeProbe.appPaths, so they pass on machines with VS Code installed.crates/failproofaid/src/main.rs,crates/failproofaid/tests/agent_selection_e2e.rs— update task expectations only for additive OTLP delivery.crates/fpai-collect/tests/config.rs— v2 selection/legacy transport compatibility test..github/workflows/ci.yml,.github/workflows/osv-scanner.yml— include the stacked PR base, without changing release behavior.docs/reference/otel.mdx,CHANGELOG.md— document the new home and retain both features' release notes.Other shared files in the full OTEL slice (relative to #881):
src/hooks/integrations.ts,collector-config.ts,fp-home.ts,cloud-introspect.ts,safe-config-write.ts— safe JSON reader, additive settings/paths, optional introspection and credential modes.crates/failproofaid/src/main.rs,crates/fpai-collect/src/{config,lib}.rs,crates/fpai-collect/Cargo.toml,Cargo.lock— additive relay/transcript registration and dependencies.sdk/typescript/src/{index,edge/index,integrations/index}.ts,sdk/python/failproofai_sdk/{__init__,integrations/__init__}.py— optional exporter facades/registries.package.json,bun.lock, SDK manifests/locks — parser dependencies, dev-only OTEL test libraries and retained prior security fixes.docs/docs.json,docs/reference/{failproof-cli,custom-agents,custom-agents-typescript}.mdx, SDK READMEs/docs index — public feature documentation.sdk/typescript/integration/ai.test.tsretains the prior provider-ownership assertion for optional OTEL test libraries.__tests__/dashboard/jev-activity-row.test.tsxretains the prior initial-filter-refetch synchronization. No dashboard product changes.OTEL-specific modules remain isolated:
src/hooks/otel-{cli,writers,output}.ts,crates/fpai-collect/src/otlp.rs, SDK exporters and dedicated tests/docs.Open questions
None for the client restack. Server merge/deploy precedes client; #881 must merge before this PR is retargeted to main. Existing provider registration/root Codex assignment limitations are unchanged. No publishing, merging or readiness changes performed.