Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
92e1b72
Refactors machinery integration to use prg_machine across multiple mo…
WWWcool Jun 5, 2026
a7acb6c
Refactors invoice handling and template management to utilize prg_mac…
WWWcool Jun 5, 2026
96c9538
Consolidate HG/FF process context into operation_context.
WWWcool Jun 5, 2026
a060cd7
Remove hg_progressor application and related references. Update test …
WWWcool Jun 6, 2026
3fdb979
Refactor action types from prg_machine_action to progressor_action ac…
WWWcool Jun 6, 2026
9cedcd3
Update progressor subproject reference and refactor prg_machine to ut…
WWWcool Jun 6, 2026
59c6a0e
Update progressor subproject reference and refactor type definitions …
WWWcool Jun 6, 2026
9cf670b
Remove progressor subproject reference from the repository.
WWWcool Jun 6, 2026
a417e2f
Update .gitignore to exclude _checkouts directory and remove obsolete…
WWWcool Jun 6, 2026
ab6b896
Refactor type specifications and formatting across multiple modules f…
WWWcool Jun 6, 2026
2e125ca
Refactor event marshaling and unmarshaling in ff_machine_codec to use…
WWWcool Jun 6, 2026
df3e0aa
Remove ff_limit module and associated test suite, along with referenc…
WWWcool Jun 6, 2026
3fe991e
Refactor prg_machine to enhance error handling and streamline functio…
WWWcool Jun 7, 2026
fd7dacf
Refactor event handling in ff_transfer modules to unify timestamping …
WWWcool Jun 7, 2026
51675e4
Enhance hg_invoice module by introducing a new handler_result type fo…
WWWcool Jun 8, 2026
b401444
Enhance payment processing logic in hg_dummy_provider by introducing …
WWWcool Jun 8, 2026
50bf84a
Enhance hg_dummy_provider to support offsite preauthorization failure…
WWWcool Jun 8, 2026
c0f6bf7
Add unpack function to ff_msgpack for binary deserialization; enhance…
WWWcool Jun 9, 2026
139530e
Enhance error handling across multiple modules by adding support for …
WWWcool Jun 10, 2026
23117a3
Refactor ff_machine_handler to replace progressor:trace with ff_machi…
WWWcool Jun 10, 2026
cef9d96
Refactor type specifications in ff_adjustment_utils, ff_adjustment, f…
WWWcool Jun 11, 2026
0b63029
Refactor ff_machine_trace and prg_machine modules to improve event un…
WWWcool Jun 11, 2026
4919fa9
bumped progressor
WWWcool Jun 11, 2026
e1160b9
bumped cache
WWWcool Jun 11, 2026
398f733
fixed
WWWcool Jun 11, 2026
4aa786e
Refactor action types across multiple modules to replace progressor_a…
WWWcool Jun 12, 2026
43a2ad6
Refactor action type specifications across multiple modules to replac…
WWWcool Jun 12, 2026
b5437c5
Refactor action type specifications across multiple modules to unify …
WWWcool Jun 12, 2026
f178fd1
Refactor action handling in ff_codec, ff_withdrawal_codec, and ff_tra…
WWWcool Jun 12, 2026
988aabd
Refactor multiple modules to enhance clarity and maintainability by u…
WWWcool Jun 12, 2026
93bf7e6
Enhance error handling across multiple modules by adding specific err…
WWWcool Jun 13, 2026
529c701
bumped progressor
WWWcool Jun 13, 2026
4af42b5
Enhance unmarshal logic in ff_adapter_withdrawal_codec to support mic…
WWWcool Jun 13, 2026
31f7419
Enhance error handling in ff_deposit and ff_withdrawal modules by add…
WWWcool Jun 14, 2026
369e6f2
Add op_context application with initial configuration and implementation
WWWcool Jun 15, 2026
38961c0
Refactor operation_context references to op_context across multiple m…
WWWcool Jun 15, 2026
9d73c12
Refactor error handling in ff_deposit_repair, ff_withdrawal_repair, a…
WWWcool Jun 15, 2026
bd7d26d
Refactor error handling in ff_deposit, ff_withdrawal, and ff_withdraw…
WWWcool Jun 15, 2026
68352f6
Refactor process_signal function across multiple machines to remove e…
WWWcool Jun 15, 2026
3c3171a
Refactor error handling in ff_withdrawal_adapter_host and ff_withdraw…
WWWcool Jun 15, 2026
b75b9de
Refactor error handling in ff_withdrawal_adapter_host and ff_withdraw…
WWWcool Jun 15, 2026
c8cad6c
Remove TODO.md file and refactor hg_invoice_handler and hg_proto modu…
WWWcool Jun 15, 2026
4fac72b
Refactor auxiliary state marshaling and unmarshaling in hg_invoice an…
WWWcool Jun 15, 2026
9bd3672
Refactor ff_transfer modules to utilize ff_machine_lib for common ope…
WWWcool Jun 16, 2026
f4a9666
minor
WWWcool Jun 16, 2026
f8eaa84
Enhance apply_event function across multiple modules to support addit…
WWWcool Jun 16, 2026
1b4f07a
Refactor unmarshal_event_body function across multiple modules to sim…
WWWcool Jun 17, 2026
44d5544
Revert "Refactor unmarshal_event_body function across multiple module…
WWWcool Jun 17, 2026
6c13c31
Refactor unmarshal_event function in ff_machine_codec and ff_machine_…
WWWcool Jun 17, 2026
caf839e
Refactor lookup function in prg_machine_registry to remove unnecessar…
WWWcool Jun 17, 2026
dfed455
Enhance event handling across multiple modules by introducing process…
WWWcool Jun 17, 2026
03583d3
Update rebar.config and documentation for prg_machine changes. Remove…
WWWcool Jun 17, 2026
b79fe64
Refactor unmarshal functions in ff_codec and prg_action to streamline…
WWWcool Jun 17, 2026
8e1eec6
Refactor hg_invoice_payment and hg_invoicing_machine_client modules t…
WWWcool Jun 17, 2026
e2815a9
Refactor repair action handling in hg_invoice and prg_action modules.…
WWWcool Jun 17, 2026
0321603
Remove the refactor-local.md file, which contained outdated instructi…
WWWcool Jun 17, 2026
2daf021
Refactor context binding handling across multiple modules by removing…
WWWcool Jun 17, 2026
ff75246
Remove the architectural refactoring documentation file, `refactor-ar…
WWWcool Jun 17, 2026
6e60db1
Refactor event body marshaling across multiple modules to include tim…
WWWcool Jun 22, 2026
2e33755
Update error handling in ff_withdrawal_session_repair_SUITE to set er…
WWWcool Jun 22, 2026
447d018
fixed
WWWcool Jun 23, 2026
5715e76
Merge pull request #1 from valitydev/add_prg_layer
WWWcool Jun 25, 2026
7eec8ec
Merge commit '23dcf69d0570177810dbd8e3ae6c5f291ffbf42d' into add_prg_…
WWWcool Jul 1, 2026
1e33ac0
fixed after merge
WWWcool Jul 1, 2026
ca96aa3
Merge branch 'add_prg_layer' into epic/prg_layer-2
WWWcool Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/erlang-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ jobs:
thrift-version: ${{ needs.setup.outputs.thrift-version }}
run-ct-with-compose: true
use-coveralls: true
cache-version: v103
cache-version: v107
upload-coverage: false
13 changes: 0 additions & 13 deletions TODO.md

This file was deleted.

7 changes: 4 additions & 3 deletions apps/ff_cth/src/ct_helper.erl
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,17 @@ stop_app(AppName) ->

-spec set_context(config()) -> ok.
set_context(C) ->
ok = ff_context:save(
ff_context:create(#{
ok = op_context:save(
op_context:key(fistful),
op_context:create(#{
party_client => party_client:create_client(),
woody_context => cfg('$woody_ctx', C)
})
).

-spec unset_context() -> ok.
unset_context() ->
ok = ff_context:cleanup().
ok = op_context:cleanup(fistful).

%%

Expand Down
2 changes: 1 addition & 1 deletion apps/ff_cth/src/ct_limiter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

-type withdrawal() :: ff_withdrawal:withdrawal_state() | dmsl_wthd_domain_thrift:'Withdrawal'().
-type limit() :: limproto_limiter_thrift:'Limit'().
-type config() :: ct_suite:ct_config().
-type config() :: ct_helper:config().
-type id() :: binary().

-spec init_per_suite(config()) -> _.
Expand Down
37 changes: 11 additions & 26 deletions apps/ff_cth/src/ct_payment_system.erl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ start_processing_apps(Options) ->
dmt_client,
party_client,
{fistful, [
{machinery_backend, progressor},
{services, services(Options)}
]},
ff_server,
Expand Down Expand Up @@ -150,6 +149,7 @@ start_optional_apps(_) ->

setup_dominant(Config0, Options) ->
Config1 = setup_dominant_internal(Config0, Options),
_ = ct_domain_config:cleanup(),
Config2 = ct_limiter:init_per_suite(Config1),
DomainConfig = domain_config(Config2, Options),
_ = ct_domain_config:upsert(DomainConfig),
Expand Down Expand Up @@ -250,56 +250,41 @@ progressor_namespaces() ->
#{
'ff/source_v1' => #{
processor => #{
client => machinery_prg_backend,
client => prg_machine,
options => #{
namespace => 'ff/source_v1',
%% TODO Party client create
handler => {fistful, #{handler => ff_source_machine, party_client => #{}}},
schema => ff_source_machinery_schema
ns => 'ff/source_v1'
}
}
},
'ff/destination_v2' => #{
processor => #{
client => machinery_prg_backend,
client => prg_machine,
options => #{
namespace => 'ff/destination_v2',
%% TODO Party client create
handler => {fistful, #{handler => ff_destination_machine, party_client => #{}}},
schema => ff_destination_machinery_schema
ns => 'ff/destination_v2'
}
}
},
'ff/deposit_v1' => #{
processor => #{
client => machinery_prg_backend,
client => prg_machine,
options => #{
namespace => 'ff/deposit_v1',
%% TODO Party client create
handler => {fistful, #{handler => ff_deposit_machine, party_client => #{}}},
schema => ff_deposit_machinery_schema
ns => 'ff/deposit_v1'
}
}
},
'ff/withdrawal_v2' => #{
processor => #{
client => machinery_prg_backend,
client => prg_machine,
options => #{
namespace => 'ff/withdrawal_v2',
%% TODO Party client create
handler => {fistful, #{handler => ff_withdrawal_machine, party_client => #{}}},
schema => ff_withdrawal_machinery_schema
ns => 'ff/withdrawal_v2'
}
}
},
'ff/withdrawal/session_v2' => #{
processor => #{
client => machinery_prg_backend,
client => prg_machine,
options => #{
namespace => 'ff/withdrawal/session_v2',
%% TODO Party client create
handler => {fistful, #{handler => ff_withdrawal_session_machine, party_client => #{}}},
schema => ff_withdrawal_session_machinery_schema
ns => 'ff/withdrawal/session_v2'
}
}
}
Expand Down
34 changes: 17 additions & 17 deletions apps/ff_server/src/ff_codec.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@
-type decoded_value() :: decoded_value(any()).
-type decoded_value(T) :: T.

-type timestamp() :: {calendar:datetime(), non_neg_integer()}.

-export_type([codec/0]).
-export_type([type_name/0]).
-export_type([encoded_value/0]).
-export_type([encoded_value/1]).
-export_type([decoded_value/0]).
-export_type([decoded_value/1]).
-export_type([timestamp/0]).

%% Callbacks

Expand Down Expand Up @@ -298,7 +301,7 @@ marshal(_, Other) ->

-spec unmarshal(type_name(), encoded_value()) -> decoded_value().
unmarshal({list, T}, V) ->
[marshal(T, E) || E <- V];
[unmarshal(T, E) || E <- V];
unmarshal({set, T}, V) ->
ordsets:from_list([unmarshal(T, E) || E <- ordsets:to_list(V)]);
unmarshal(id, V) ->
Expand Down Expand Up @@ -360,25 +363,13 @@ unmarshal(three_ds_verification, Value) when
Value =:= authentication_could_not_be_performed
->
Value;
unmarshal(complex_action, undefined) ->
undefined;
unmarshal(complex_action, #repairer_ComplexAction{
timer = TimerAction,
remove = RemoveAction
}) ->
unmarshal(timer_action, TimerAction) ++ unmarshal(remove_action, RemoveAction);
unmarshal(timer_action, undefined) ->
[];
unmarshal(timer_action, {set_timer, SetTimerAction}) ->
[{set_timer, unmarshal(set_timer_action, SetTimerAction)}];
unmarshal(timer_action, {unset_timer, #repairer_UnsetTimerAction{}}) ->
[unset_timer];
unmarshal(remove_action, undefined) ->
[];
unmarshal(remove_action, #repairer_RemoveAction{}) ->
[remove];
unmarshal(set_timer_action, #repairer_SetTimerAction{
timer = Timer
}) ->
unmarshal(timer, Timer);
unmarshal_repairer_complex_action(TimerAction, RemoveAction);
unmarshal(timer, {timeout, Timeout}) ->
{timeout, unmarshal(integer, Timeout)};
unmarshal(timer, {deadline, Deadline}) ->
Expand Down Expand Up @@ -576,6 +567,15 @@ unmarshal(range, #'fistful_base_EventRange'{
unmarshal(bool, V) when is_boolean(V) ->
V.

unmarshal_repairer_complex_action(_, #repairer_RemoveAction{}) ->
remove;
unmarshal_repairer_complex_action(undefined, undefined) ->
idle;
unmarshal_repairer_complex_action({set_timer, #repairer_SetTimerAction{timer = Timer}}, undefined) ->
prg_action:schedule_timer(unmarshal(timer, Timer));
unmarshal_repairer_complex_action({unset_timer, _}, undefined) ->
suspend.

maybe_unmarshal(_Type, undefined) ->
undefined;
maybe_unmarshal(Type, Value) ->
Expand All @@ -586,7 +586,7 @@ maybe_marshal(_Type, undefined) ->
maybe_marshal(Type, Value) ->
marshal(Type, Value).

-spec parse_timestamp(binary()) -> machinery:timestamp().
-spec parse_timestamp(binary()) -> timestamp().
parse_timestamp(Bin) ->
try
MicroSeconds = genlib_rfc3339:parse(Bin, microsecond),
Expand Down
2 changes: 1 addition & 1 deletion apps/ff_server/src/ff_deposit_codec.erl
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ deposit_timestamped_change_codec_test() ->
external_id => genlib:unique()
},
Change = {created, Deposit},
TimestampedChange = {ev, machinery_time:now(), Change},
TimestampedChange = {ev, {calendar:universal_time(), 0}, Change},
Type = {struct, struct, {fistful_deposit_thrift, 'TimestampedChange'}},
Binary = ff_proto_utils:serialize(Type, marshal(timestamped_change, TimestampedChange)),
Decoded = ff_proto_utils:deserialize(Type, Binary),
Expand Down
88 changes: 0 additions & 88 deletions apps/ff_server/src/ff_deposit_machinery_schema.erl

This file was deleted.

8 changes: 7 additions & 1 deletion apps/ff_server/src/ff_deposit_repair.erl
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,11 @@ handle_function('Repair', {ID, Scenario}, _Opts) ->
{error, notfound} ->
woody_error:raise(business, #fistful_DepositNotFound{});
{error, working} ->
woody_error:raise(business, #fistful_MachineAlreadyWorking{})
woody_error:raise(business, #fistful_MachineAlreadyWorking{});
{error, {failed, Reason}} ->
erlang:error(Reason);
{error, failed} ->
erlang:error(failed);
{error, {exception, Class, Reason}} ->
erlang:error({process_exception, Class, Reason})
end.
Loading
Loading