Skip to content

Session decorator shows 'SUCC: Congratulations!' on FINISHED_ERROR #145

@ywatanabe1989

Description

@ywatanabe1989

Summary

When a script decorated with @stx.session raises an exception, the output shows:

SUCC: Congratulations! The script completed: .../FINISHED_ERROR/...

The directory is correctly named FINISHED_ERROR, but the prefix SUCC: Congratulations! is misleading — it implies success when the script actually errored.

Expected Behavior

On error, the message should reflect the failure:

ERRO: Script failed: .../FINISHED_ERROR/...

Or at minimum, not use SUCC: prefix or "Congratulations" when the exit status is error.

Reproduction

@stx.session
def main(CONFIG=stx.session.INJECTED):
    raise ValueError("something went wrong")
    return 0

Output:

ERRO: Error in main: something went wrong
SUCC: Congratulations! The script completed: .../FINISHED_ERROR/...

Location

Likely in src/scitex/session/_decorator.py around the session cleanup/finalization logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions