Talend ANS Agent Skill
Use this skill when modifying the Talend Alert Noise Suppression source code in this repository.
First Read
- Read
AGENTS.md.
- Read
function_app.py.
- Check whether
alert_recipients.json or any edited file contains unresolved merge markers.
Code Map
Settings: all environment-driven runtime configuration.
TalendClient: Talend API calls.
SqliteAlertStore and AzureSqlAlertStore: duplicate alert persistence contracts; keep schemas aligned.
EmailNotifier: daily digest SMTP delivery.
OpenAIErrorSummarizer: optional JSON-mode summary fallback.
- Decision helpers: retry/noise classification, rule-based summaries, master-job dependency parsing, plan dependency parsing.
- Timer triggers:
poll_talend_alerts and send_daily_digest.
Endpoint Flow To Preserve
Shared polling starts with GET /processing/executables/tasks/executions. Read response items, group by taskId, and keep the latest run using finishTimestamp, startTimestamp, then triggerTimestamp.
For every latest failed execution, call GET /monitoring/observability/executions/{executionId}/component.
For MANUAL task failures:
- Use
taskId, executionId, executionStatus, executionType, errorMessage, and component metrics to classify the failure.
- Retry only transient network/engine/platform failures with
POST /processing/executions and payload {"executable": "<taskId>", "logLevel": "WARN"}.
- Treat data, component, permission, syntax, and ambiguous failures as valid alerts.
For MANUAL Master Jobs:
- Detect child jobs from component metrics where
connector_type == "tRunJob".
- Order children by numeric suffix in
connector_id, such as tRunJob_1 before tRunJob_2.
- Use the first
tRunJob with a stack trace as the failed child.
- Report later
tRunJob components as downstream jobs that should not be expected to run.
For PLAN failures, enrich context in this exact order:
GET /monitoring/observability/executions/{executionId}/component
GET /processing/executables/plans/executions, matching by planId to find planExecutionId
GET /processing/executions/plans/{planExecutionId}/steps, extracting failed step IDs/status
GET /orchestration/executables/plans/{planId}, extracting plan name, plan executable, step names, task names, chart, nextStep, and flows
For retryable plan failures, call POST /processing/executions/plans with payload {"executable": "<plan executable>"} where the executable comes from /orchestration/executables/plans/{planId}.
Change Checklist
- Keep new settings in
Settings with safe defaults.
- Keep Talend parsing tolerant of missing keys and alternate sample response shapes.
- Update both storage backends when alert row fields change.
- Classify unknown failures as valid failures.
- Retry only transient platform/network failures.
- Preserve digest filtering through
include_in_digest.
- Do not expose secrets from
local.settings.json.
- Run
python -m compileall function_app.py after Python changes.
Common Extension Points
- New transient failure: add a precise pattern to
TRANSIENT_PATTERNS.
- New non-retryable failure: add a precise pattern to
NON_RETRIABLE_PATTERNS.
- New human-readable summary: update
summarize_error_rule_based.
- New Talend component relationship: extend
parse_master_job_dependency or add a similarly tolerant helper.
- New plan response shape: adjust
flatten_plan_steps or enrich_plan_context without breaking the linked chart.nextStep shape.
- New alert column: update SQLite DDL/migration, SQL Server DDL/migration, insert field lists, digest HTML if user-facing, and any test/sample data.
Verification
Minimum syntax check:
python -m compileall function_app.py
For runtime verification, install dependencies and start the Functions host:
.\.venv\Scripts\python -m pip install -r requirements.txt
func host start
Use real Talend/OpenAI/SMTP calls only when the required environment variables are present and the user expects networked verification.
1---2name: talend-ans-agent3description: Work on this Talend Alert Noise Suppression Azure Functions app, including Talend task/plan parsing, retry classification, alert storage, digest email, and optional OpenAI summaries.4---56# Talend ANS Agent Skill78Use this skill when modifying the Talend Alert Noise Suppression source code in this repository.910## First Read11121. Read `AGENTS.md`.132. Read `function_app.py`.143. Check whether `alert_recipients.json` or any edited file contains unresolved merge markers.1516## Code Map1718- `Settings`: all environment-driven runtime configuration.19- `TalendClient`: Talend API calls.20- `SqliteAlertStore` and `AzureSqlAlertStore`: duplicate alert persistence contracts; keep schemas aligned.21- `EmailNotifier`: daily digest SMTP delivery.22- `OpenAIErrorSummarizer`: optional JSON-mode summary fallback.23- Decision helpers: retry/noise classification, rule-based summaries, master-job dependency parsing, plan dependency parsing.24- Timer triggers: `poll_talend_alerts` and `send_daily_digest`.2526## Endpoint Flow To Preserve2728Shared polling starts with `GET /processing/executables/tasks/executions`. Read response `items`, group by `taskId`, and keep the latest run using `finishTimestamp`, `startTimestamp`, then `triggerTimestamp`.2930For every latest failed execution, call `GET /monitoring/observability/executions/{executionId}/component`.3132For `MANUAL` task failures:33341. Use `taskId`, `executionId`, `executionStatus`, `executionType`, `errorMessage`, and component metrics to classify the failure.352. Retry only transient network/engine/platform failures with `POST /processing/executions` and payload `{"executable": "<taskId>", "logLevel": "WARN"}`.363. Treat data, component, permission, syntax, and ambiguous failures as valid alerts.3738For `MANUAL` Master Jobs:39401. Detect child jobs from component metrics where `connector_type == "tRunJob"`.412. Order children by numeric suffix in `connector_id`, such as `tRunJob_1` before `tRunJob_2`.423. Use the first `tRunJob` with a stack trace as the failed child.434. Report later `tRunJob` components as downstream jobs that should not be expected to run.4445For `PLAN` failures, enrich context in this exact order:46471. `GET /monitoring/observability/executions/{executionId}/component`482. `GET /processing/executables/plans/executions`, matching by `planId` to find `planExecutionId`493. `GET /processing/executions/plans/{planExecutionId}/steps`, extracting failed step IDs/status504. `GET /orchestration/executables/plans/{planId}`, extracting plan `name`, plan `executable`, step names, task names, `chart`, `nextStep`, and `flows`5152For retryable plan failures, call `POST /processing/executions/plans` with payload `{"executable": "<plan executable>"}` where the executable comes from `/orchestration/executables/plans/{planId}`.5354## Change Checklist5556- Keep new settings in `Settings` with safe defaults.57- Keep Talend parsing tolerant of missing keys and alternate sample response shapes.58- Update both storage backends when alert row fields change.59- Classify unknown failures as valid failures.60- Retry only transient platform/network failures.61- Preserve digest filtering through `include_in_digest`.62- Do not expose secrets from `local.settings.json`.63- Run `python -m compileall function_app.py` after Python changes.6465## Common Extension Points6667- New transient failure: add a precise pattern to `TRANSIENT_PATTERNS`.68- New non-retryable failure: add a precise pattern to `NON_RETRIABLE_PATTERNS`.69- New human-readable summary: update `summarize_error_rule_based`.70- New Talend component relationship: extend `parse_master_job_dependency` or add a similarly tolerant helper.71- New plan response shape: adjust `flatten_plan_steps` or `enrich_plan_context` without breaking the linked `chart.nextStep` shape.72- New alert column: update SQLite DDL/migration, SQL Server DDL/migration, insert field lists, digest HTML if user-facing, and any test/sample data.7374## Verification7576Minimum syntax check:7778```powershell79python -m compileall function_app.py80```8182For runtime verification, install dependencies and start the Functions host:8384```powershell85.\.venv\Scripts\python -m pip install -r requirements.txt86func host start87```8889Use real Talend/OpenAI/SMTP calls only when the required environment variables are present and the user expects networked verification.