Skip to content

feat: add INFO request-lifecycle logging skeleton and rebalance levels #435#454

Merged
ypldan merged 5 commits into
developmentfrom
feat/435-operational-logging-skeleton
Jul 17, 2026
Merged

feat: add INFO request-lifecycle logging skeleton and rebalance levels #435#454
ypldan merged 5 commits into
developmentfrom
feat/435-operational-logging-skeleton

Conversation

@ypldan

@ypldan ypldan commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Applicable issues

Description of changes

At INFO, logs said almost nothing about what a request did; the request lifecycle was visible only at DEBUG, bundled with payload dumps. This implements the approved design (#434) part 1: level semantics + the INFO request skeleton.

  • INFO lifecycle skeleton — seven metadata-only events (request received/initialized, interactive login, per-iteration model call, tool completion, fallback applied, request completed) let an operator reconstruct a request during an incident without raising verbosity or exposing conversation content. Events are formatted through a single lifecycle_logging.format_event seam (stable prefix + key=value) so Structured (JSON) logging mode #438/Request-scoped log context #439 can lift the fields into structured attributes later.
  • Single-writer ERROR ownership — a tool failure now yields exactly one WARNING at the StagedBaseTool choke point (was two ERRORs); the sole ERROR with error_reference stays owned by _QuickAppCompletion. Secondary fixes: _MCPTool isError ERROR→DEBUG, DialCompletionService empty-content WARNING→DEBUG.
  • Level rebalance — routine per-request records (_GetContentTool, _AttachmentGetContentInjector, AgentSkillsProvider) demoted INFO→DEBUG.
  • Docs — level semantics, the ownership rule, and the content policy codified in CODESTYLE.md §9; an INFO-skeleton section added to docs/agent.md.

Content-stripping and the LOG_PAYLOADS switch are #436; this PR is scoped to levels + the skeleton.

Checklist

  • Title of the pull request follows Conventional Commits specification
  • Design documented is updated/created and approved by the team (implements approved design Design: log levels & content policy #434)
  • Documentation is updated/created (CODESTYLE.md §9, docs/agent.md)
  • Changes are tested on review environment
  • [ ] App schema changes are backward compatible, or breaking changes are documented with a migration guide (no schema/config-model changes)
  • [ ] Integration tests pass - no LLM logic changes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…#435

At INFO the logs said almost nothing about what a request did; the lifecycle
was visible only at DEBUG bundled with payload dumps. Implements part 1 of the
approved design (#434).

- INFO request skeleton: 7 metadata-only events (received/initialized,
  interactive login, per-iteration model call, tool completion, fallback,
  completed) via a single lifecycle_logging.format_event seam (stable prefix +
  key=value) so #438/#439 can lift the fields into structured attributes later.
- Single-writer ERROR ownership: one WARNING per tool failure at the
  StagedBaseTool choke point (was two ERRORs); the sole ERROR with
  error_reference stays with _QuickAppCompletion. _MCPTool isError ERROR->DEBUG,
  DialCompletionService empty-content WARNING->DEBUG.
- Level rebalance: routine per-request records demoted INFO->DEBUG.
- Docs: level semantics + ownership + content rule in CODESTYLE.md §9;
  INFO-skeleton section in docs/agent.md.

Content stripping and the LOG_PAYLOADS switch are #436.
@ypldan ypldan self-assigned this Jul 16, 2026
@ypldan
ypldan requested a review from andrii-novikov as a code owner July 16, 2026 14:00
ypldan added 2 commits July 16, 2026 17:41
After merging #408 (expose MCP/HTTP tool errors to the LLM), _RestApiTool's
HTTP-status detect-and-raise logged at ERROR before raising for fallback. Under
the single-writer ERROR ownership rule this PR codifies, that record belongs at
DEBUG — the StagedBaseTool choke point owns the single WARNING. Mirrors the
_MCPTool isError fix; message is already structure-only.
@ypldan

ypldan commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

/deploy-review

GitHub actions run: 29569398875

Stage Status
deploy-review Success ✅
matrix.application Skipped ➖

Comment thread src/quickapp/core/application/_quick_app_completion.py
Comment thread src/quickapp/common/staged_base_tool.py
Comment thread src/quickapp/core/application/_quick_app_completion.py
Comment thread src/quickapp/common/staged_base_tool.py Outdated
…tage skip #435

- skip the execution-time stage on config-resolution failure (set failed=True)
- resolve tool name via isinstance(BaseOpenAITool) instead of a getattr chain
- gate the 'Tool call completed' INFO to success; fold duration into the
  failure WARNING so a failed tool call yields exactly one log line
@ypldan
ypldan merged commit a11fb26 into development Jul 17, 2026
10 checks passed
@ypldan
ypldan deleted the feat/435-operational-logging-skeleton branch July 17, 2026 11:47
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.

Request-lifecycle events at INFO + level rebalance

4 participants