Skip to content

Test API Infrastructure#364

Open
Relvox wants to merge 13 commits into
emcie-co:developfrom
Relvox:feature/test-mode
Open

Test API Infrastructure#364
Relvox wants to merge 13 commits into
emcie-co:developfrom
Relvox:feature/test-mode

Conversation

@Relvox
Copy link
Copy Markdown
Contributor

@Relvox Relvox commented May 5, 2025

I've been out of sync for far too long (my fault). Would appreciate eyes on the code to make sure I haven't strayed too far...

This PR covers milestones 1 and 2 of #291 .

  • Refactored endpoint/router registration mechanism and made it customizable.
  • added a --test [opt_module] flag to start the server in a special test mode.
  • added endpoints to manually invoke guideline_matcher and tool_call_inference.
  • added minimal tests for all the above.

I'm keeping the PR text minimal for now, will expand as details become finalized.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move those files under src/parlant/api/ and also the tests under tests/api/

from lagom import Container


class MockLogger:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just user container[Logger]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain more about what you mean?
I'm using the MockLogger to verify which steps get called. Not sure how to do that directly with a Logger.
And container[Logger] doesn't expose fields to easily check what lines it got.

@Relvox Relvox force-pushed the feature/test-mode branch from 8a358b0 to d4f4b79 Compare May 11, 2025 01:46
@Relvox
Copy link
Copy Markdown
Contributor Author

Relvox commented May 11, 2025

rebase + tests ran and passed

Relvox and others added 13 commits July 6, 2025 10:30
test(app): added minmal tests for new `AppWrapper` mechanism
Signed-off-by: Nathan Dortman <relvox@gmail.com>
Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
feat(api): added test endpoint for guideline matching
feat(api): added test endpoint for tool call inference

Signed-off-by: Nathan Dortman <relvox@gmail.com>
Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
Signed-off-by: NathanD <relvox@gmail.com>

test(api):tool call inference

Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Dor Zohar <dor@emcie.co>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
Signed-off-by: Dor Zohar <dor@emcie.co>

Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
Signed-off-by: Dor Zohar <dor@emcie.co>

Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
Signed-off-by: Dor Zohar <dor@emcie.co>

Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
Signed-off-by: Dor Zohar <dor@emcie.co>

Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
test(test-apis): fixed basic e2e test for test-apis

Signed-off-by: NathanD <relvox@gmail.com>

Signed-off-by: Kfir Blaier <kfir@emcie.co>
Signed-off-by: Kfir Blaier <kfir@emcie.co>
@mc-kfir mc-kfir force-pushed the feature/test-mode branch from 3ace963 to e21bc61 Compare July 6, 2025 10:52
@mc-kfir mc-kfir changed the title WIP: Test API Infrastructure Test API Infrastructure Jul 6, 2025
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