Goal
Deploy the DataTasks work-engine as a private runtime service behind the existing DataOps portal so operators get one authenticated experience at ops.dtcdev.click.
The public surface remains the current Python full app Lambda. The work engine is invoked only by the portal backend, not exposed as a second public Function URL.
Decision Inputs
Scope
- Add a SAM-managed private
WorkEngineFunction for the Node work-engine.
- Add IAM permission for
DocsFullAppFunction to invoke WorkEngineFunction.
- Add authenticated
/work/api/* broker routes in the Python full app.
- Strip the
/work prefix before forwarding requests to the work engine.
- Pass trusted actor/context headers from the authenticated portal session.
- Add a work-engine production auth mode that trusts only the portal broker, gated by environment variables.
- Keep the existing frontend shell as the public UI entry point.
Acceptance Criteria
GET /work and /work/* serve the portal frontend without bypassing portal auth.
ANY /work/api/* authenticates in the Python full app, invokes the private work-engine Lambda, and returns status, headers, and JSON bodies correctly.
- Work-engine Lambda has no public Function URL or direct unauthenticated endpoint.
- Production does not use
SKIP_AUTH=true.
- Broker forwards method, path, query string, selected headers, and body without leaking session secrets.
- Work-engine receives a stable trusted actor context, initially acceptable as
portal-admin if per-user identity is not ready.
- Local development remains possible without AWS Lambda invocation.
- CI covers broker routing, unauthorized access, successful proxied API call, and work-engine health check.
- Deployment template validates with SAM/CloudFormation checks.
Out Of Scope
Dependencies
Test Expectations
- Python tests for
/work/api/* auth and broker behavior.
- Node tests for trusted portal auth mode.
- Integration smoke test for
/work/health after deploy.
- CI step that builds both the Python full app and the Node work-engine package.
Goal
Deploy the DataTasks
work-engineas a private runtime service behind the existing DataOps portal so operators get one authenticated experience atops.dtcdev.click.The public surface remains the current Python full app Lambda. The work engine is invoked only by the portal backend, not exposed as a second public Function URL.
Decision Inputs
.goal-v1.mddocs/v1-runtime-architecture.mdScope
WorkEngineFunctionfor the Node work-engine.DocsFullAppFunctionto invokeWorkEngineFunction./work/api/*broker routes in the Python full app./workprefix before forwarding requests to the work engine.Acceptance Criteria
GET /workand/work/*serve the portal frontend without bypassing portal auth.ANY /work/api/*authenticates in the Python full app, invokes the private work-engine Lambda, and returns status, headers, and JSON bodies correctly.SKIP_AUTH=true.portal-adminif per-user identity is not ready.Out Of Scope
Dependencies
Test Expectations
/work/api/*auth and broker behavior./work/healthafter deploy.