Skip to content

Staging#274

Merged
hmahmood24 merged 17 commits into
mainfrom
staging
May 12, 2026
Merged

Staging#274
hmahmood24 merged 17 commits into
mainfrom
staging

Conversation

@hmahmood24
Copy link
Copy Markdown
Member

No description provided.

hmahmood24 and others added 17 commits May 7, 2026 16:43
Centralize assistant timezone resolution behind the shared prompt helper so repeated now() calls and renderer timezone blocks reuse one TTL-backed lookup while still computing the current timestamp fresh each time.
Only cache successful assistant timezone values so transient get_logs errors or missing Contacts rows do not pin assistants to UTC for the full TTL. Add regression coverage for failed and empty timezone lookups.
The spending-limit guard's credits ≤ 0 → block rule is correct only
for CREDITS-mode accounts. METERED accounts pay by monthly invoice
(orchestra's monthly_metered_invoicer) and intentionally hold a zero
wallet —  records ledger-only on METERED — so the
legacy gate would block every call once the first usage event lands.

 now parses the  field from
the orchestra spend endpoint, propagates it through ,
and skips the credit-balance check when .
CREDITS accounts and the 'field not present' legacy path keep the
existing behaviour, so the guard never loosens during a partial
orchestra rollout.

Test coverage in  —
asserts allow on METERED with zero balance, block on CREDITS with
zero balance, and the legacy fallback when orchestra hasn't surfaced
 yet.
Introduce a runtime-owned OAuth helper for refresh-token backed providers instead of putting provider-specific token semantics on SecretManager. The helper owns provider metadata, aliases, expiry checks, env overlay construction, and the actor-facing get_oauth_access_token(...) documentation surface.

This gives generated Python a clear way to request an explicit provider-scoped access token when an SDK or HTTP client requires one, while preserving the normal environment-based credential path for SDKs that can read credentials directly.
Keep SecretManager focused on mirroring allowlisted runtime OAuth secrets from Orchestra into local Secrets, .env, and os.environ, while keeping OAuth provider semantics in the runtime helper. The sync path now has a single debounced gate so frequent runtime callers can ask for freshness without forcing a network round trip on every operation.

Assistant update events and secret inspection still force sync because those paths represent explicit freshness boundaries. Normal runtime execution can use the same gate with a TTL, which keeps credentials reasonably current without making every actor step pay the full Orchestra sync cost.
Route in-process Python, venv-backed Python, persistent shell sessions, and runtime RPC through the OAuth runtime helper. The execute_code boundary now asks the debounced secret sync gate for freshness, and long-lived subprocesses receive OAuth env overlays so SDK/default-env credential paths do not keep stale inherited values.

Explicit get_oauth_access_token(...) calls in venv and shell route back to the parent runtime, which keeps token freshness checks centralized instead of trusting child process environment snapshots. The actor integration test covers Microsoft and Google in the same sandbox to prevent accidental global-token behavior.
Expose the runtime OAuth helper in the CodeAct prompt using the same signature-and-docstring pattern as reason(...). The guidance distinguishes SDK/default environment behavior from cases that require an explicit access token, and warns against printing, logging, storing, or baking concrete token values into reusable functions or guidance.

The prompt test locks in the exact helper signature, multi-provider examples, and anti-pattern guidance so future prompt edits do not accidentally regress the actor's understanding of refreshed OAuth credentials.
Route task execution through the active actor context instead of silently falling back to a simulated actor, and add workflow-specific post-run review plumbing for recurring and triggerable description-driven tasks.
Mark schedule payloads with explicit dict typing so queue linkage and datetime schedules can coexist without backend type inference conflicts.
Teach actor and scheduler prompts that new scheduled or triggered workflows should usually remain live and description-driven unless a stored function is explicitly requested or later distilled.
Verify child actor slot selection, reusable workflow review labeling, and real actor creation of live recurring and triggerable tasks with null entrypoints.
Add coverage for explicit actor requirements, entrypoint review context propagation, recurring clone timing, future instance patching, and task execution prompt builders.
Update scheduler tests to provide explicit simulated actors now that direct execution no longer creates an implicit fallback actor.
@hmahmood24 hmahmood24 deployed to unity-testing May 12, 2026 14:27 — with GitHub Actions Active
@hmahmood24 hmahmood24 merged commit 47dc983 into main May 12, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants