Skip to content

Conversation

@aVr0Ra
Copy link
Collaborator

@aVr0Ra aVr0Ra commented Nov 27, 2025

Create a supervisor actror, and a sentiment analyzer actor.

@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f842fb6) to head (a7d1b83).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #44   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       188       191    +3     
===========================================
  Files             18        19    +1     
  Lines            699       731   +32     
  Branches          37        39    +2     
===========================================
+ Hits             699       731   +32     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +158 to +175
// static class QueryInfo {
// /** The Search model object containing query parameters and fetched results */
// final Search search;
//
// /** Set of UserActors watching this query and expecting updates */
// final Set<ActorRef<UserActor.Message>> watchers = new HashSet<>();
//
// /**
// * Constructs a new QueryInfo with the specified parameters.
// * @author Luan Tran
// * @param query the search query string
// * @param sortBy the sort order for results
// * @param apiKey the News API key
// */
// QueryInfo(String query, String sortBy, String apiKey) {
// this.search = new Search(query, sortBy, apiKey);
// }
// }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, just after Luan review this part


pushUpdatesToClient();
// After readability is computed, ask SentimentAnalyzerActor to score the latest search
if (!searchHistory.isEmpty()) {
Copy link
Owner

Choose a reason for hiding this comment

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

Why is sentiment analysis being done in readability results?? This works, ill approve it because of lack of time but this absolutely should not be here

latest.setSentiment(":-|");
pushUpdatesToClient();
} else {
AskPattern.ask(
Copy link
Owner

Choose a reason for hiding this comment

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

Since both are actors, you should be using tell, not ask, but ok

* Wrapper that holds a Search object and its watchers.
* @author Luan Tran
*/
// static class QueryInfo {
Copy link
Owner

Choose a reason for hiding this comment

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

remove commented code

* @return Behaviors.same() to continue with the same behavior
*/
private Behavior<Message> onFetchTick(FetchTick msg) {
/*private Behavior<Message> onFetchTick(FetchTick msg) {
Copy link
Owner

Choose a reason for hiding this comment

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

remove comment

@luantran luantran merged commit 3963bd7 into main Nov 30, 2025
6 checks passed
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.

5 participants