Publish a workspace's tracing settings to the process environment.
Redaction and project naming decide from the active workspace snapshot, but
the LangSmith SDK reads os.environ directly. Left to diverge, the snapshot
can say "not tracing" while the SDK traces on -- uploading unredacted -- or
the reverse, where the TUI offers /trace and nothing is ever ingested.
Writes the canonical name, resolving DEEPAGENTS_CODE_-prefixed overrides
first, because the SDK only reads canonical names. A var the workspace does
not set is removed, so the previous workspace's .env cannot linger.
Remember the environment before publication so later workspace previews can recover shell values and remove earlier dotenv contributions.
The SDK caches env reads, so its caches are dropped afterwards.